[JBossWS] - Cannot find port type for binding
by ZazzaZ
Hi,
I'm having this problem deploying a web service under jboss 4.0.5
11:04:21,749 ERROR [MainDeployer] Could not create deployment: file:/home/zazzaz/Tesi_Workflow/jboss-4.0.5.GA/server/default/deploy/processo.war
org.jboss.ws.WSException: Cannot find port type for binding: ClientPortTypeBinding
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processBinding(WSDL11Reader.java:726)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPort(WSDL11Reader.java:1071)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPorts(WSDL11Reader.java:1054)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processServices(WSDL11Reader.java:1027)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:119)
at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145)
at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:94)
at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:78)
at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:80)
at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:74)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy39.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:595)
It is something with the namespace, but i don't know what it is.
Here's the binding.
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://jbpm.org/examples/processo" xmlns:tns="http://jbpm.org/examples/processo" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" >
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<soap:operation soapAction="http://jbpm.org/examples/StartFinishWorkflow"/>
<soap:body use="literal" namespace="http://jbpm.org/examples/Client"/>
<soap:body use="literal" namespace="http://jbpm.org/examples/Client"/>
The portType is defined in the file Client.wsdl. The namespace is
http://jbpm.org/examples/Client
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083342#4083342
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083342
17 years, 3 months
[JBossWS] - Jaxrpc service with parameter Type[] fails if array contains
by klease
I have a jaxrpc endpoint which has methods like these:
public interface TrivialService extends Remote
| {
| int purchase (String person, Product[] products) throws RemoteException;
| int purchaseA (String person, ProductA[] products) throws RemoteException;
| }
I used wstools (java-wsdl) to generate deployment artifacts and deployed on a 4.2.1.GA jboss with 2.0.1.GA jbossws.
Class ProductA is a subclass of Product.
If I call purchase like this:
public void testPurchase() throws Exception
| {
| String person = "Karen";
| ProductA bike = new ProductA();
| bike.setName("cyfac");
| bike.setPrice(3000);
| ProductA bike2 = new ProductA();
| bike2.setName("look");
| bike2.setPrice(5000);
| ProductA bike3 = new ProductA();
| bike3.setName("GOSPORT");
| bike3.setPrice(1000);
| Product[] bikes = new Product[] {bike, bike2, bike3};
| int price = port.purchase(person, bikes);
| assertEquals(9000, price);
| }
the test case fails because it returns only the price of the last element in the list.
In the service it only sees one element.
If I call it like this (with same actual objects),
ProductA[] bikes = new ProductA[] {bike, bike2, bike3};
| int price = port.purchaseA(person, bikes);
the service receives all 3 elements and returns the correct response.
The incoming soap message on the server is correct in both cases. In the first case, the elements all have the type attribute set, like so:
<ns1:purchase xmlns:ns1='http://com.kl/test1/types'>
| <String_1>Karen</String_1>
| <arrayOfProduct_2 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='ns1:ProductA'>
| <name>cyfac</name>
| <price>3000</price>
| </arrayOfProduct_2>
| <arrayOfProduct_2 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='ns1:ProductA'>
| <name>look</name>
| <price>5000</price>
| </arrayOfProduct_2>
| .....
|
This happens with both a jaxrpc style client and a jaxws client generated with wsconsume (-t 2.1). However it works correctly with jaxrpc client if I deploy into a jbossws 1.2.1GA server.
I don't see anything in Jira which is quite like this, shall I file a new bug?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083193#4083193
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083193
17 years, 3 months
[JBossWS] - Re: JBoss wstool generate incorrect WSDL file
by palin
"mendaye" wrote : 1. If I use Java Collections object in my web service that will be JBoss jaxws stack (2.0.x) compliant, am I running to any interoperability issue for .NET consumer. I wanted to make sure these web services can be consumed by .NET client. I am exposing existing Stateless EJB as service end-point and it is not easy to replace Java Collections object.
I don't think you'll have .NET compatibility issues with collections, however if Richard perfomed some tests on this please add your opinion. Anyway, generally speaking, jbossws compliance with standards should offer high compatibility with other stacks.
anonymous wrote :
| 2. I have requirement - only authorized users can consume these web services. Does JBossWS 2.0.x provide user authentication mechanism to do this? If so how?
Yes, it does. See @WebContext and its property 'authMethod'.
anonymous wrote :
| 3. If #2 (Web service consumer authentication) is possible, can you point me document that has examples on this.
I would take a look at the samples that ship with jbossws sources. For example, see org.jboss.test.ws.jaxws.samples.context.WebServiceContextEJBTestCase.
Alessio Soldano
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083154#4083154
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083154
17 years, 3 months