[JBossWS] - SOAP 1.2 WSDL
by zarzar
Hi,
I'm having problems building a web service using a WSDL with a SOAP 1.2 binding. (The WSDL is given at the bottom.) The web service works fine when using the SOAP 1.1 binding. Problems arise only when changing to SOAP 1.2. I'm using JBoss version 4.0.5.GA and generating code from WSDL using wstools. There are problems at both the client- and server- side.
On the client-side, the code doesn't complain about the SOAP 1.2 WSDL, but sends the SOAP message using the SOAP 1.1 namespace.
On the server-side, I get a NullPointerException when I deploy the web service war file. The stack trace is given below.
Is there a SOAP 1.2 setting to turn on that I'm missing?
Thanks,
Zar
=========================
Server-side stack trace
java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3010)
at java.net.URI.(URI.java:578)
at org.jboss.ws.deployment.AbstractMetaDataBuilder.getUriScheme(Abstract
MetaDataBuilder.java:277)
at org.jboss.ws.deployment.AbstractMetaDataBuilder.replaceAddressLocatio
n(AbstractMetaDataBuilder.java:166)
at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR
109ServerMetaDataBuilder.java:210)
at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpoin
tDeployer.java:78)
at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInt
erceptor.java:80)
at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(Deployer
InterceptorJSE.java:74)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.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.GeneratedMethodAccessor54.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.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(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)
===========================
WSDL
<?xml version="1.0"?>
| <definitions
| xmlns="http://schemas.xmlsoap.org/wsdl/"
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| xmlns:tns="http://www.example.com/Example"
| xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
| targetNamespace="http://www.example.com/Example"
| name="Example"
| >
|
| <types>
| <xsd:schema
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| targetNamespace="http://www.example.com/Example"
| elementFormDefault="qualified"
| >
|
| <xsd:element name="Echo">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="value" type="xsd:string"
| minOccurs="1" maxOccurs="1"
| />
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <xsd:element name="EchoResponse">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="result" type="xsd:string"
| minOccurs="1" maxOccurs="1"
| />
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| </xsd:schema>
| </types>
|
| <message name="EchoInMsg">
| <part name="echo" element="tns:Echo"/>
| </message>
|
| <message name="EchoOutMsg">
| <part name="echo" element="tns:EchoResponse"/>
| </message>
|
| <portType name="ExamplePort">
| <operation name="Echo">
| <input message="tns:EchoInMsg"/>
| <output message="tns:EchoOutMsg"/>
| </operation>
| </portType>
|
| <binding name="ExampleBinding" type="tns:ExamplePort">
| <soap:binding style="document"
| transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="Echo">
| <soap:operation style="document"
| soapAction="http://www.example.com/Example/Echo"/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
|
| <service name="ExampleService">
| <port name="ExamplePort" binding="tns:ExampleBinding">
| <soap:address location="http://REPLACE_WITH_ACTUAL_URL" />
| </port>
| </service>
|
| </definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983960#3983960
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983960
18 years, 1 month
[JBossWS] - Webservices client and Dynamic Invocation Interface.
by anand_anan2k
Hello,
I used Dynamic Invocation Interface (DII) in web services client.
Configuration Details:
1. JBOSS portal 2.4: using this portal, i'm performing web services invocation. The web services is running in another machine using webobjects framework.
2. Please refer the below client code i used,
URL url = new URL(urlstr);
String ns = "http://vg0601f-dhcp147.apple.com:9999/cgi-bin/WebObjects/ProvisioningWebS...";
QName qname = new QName(ns, "ProvisioningWS");
QName port = new QName(ns, "ProvisioningWS");
QName operation = new QName(ns,"selectAuthorizedItemsForMerlin");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(url, qname);
Call call = service.createCall(port, operation);
System.out.println("After gettting the call "+call);
Object o = call.invoke(new Object[] {argument});
I got the o/p until "After gettting the call" and call object also is not null. But while executing the invoke method call.invoke(new Object[] {argument}) , i'm getting the below error:
15:27:33,586 ERROR [STDERR] java.lang.ClassCastException: org.jboss.ws.soap.SOAPMessageImpl
15:27:33,589 ERROR [STDERR] at com.sun.xml.rpc.client.dii.CallInvokerImpl._postSendingHook(CallInvokerImpl.java:305)
15:27:33,589 ERROR [STDERR] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
15:27:33,589 ERROR [STDERR] at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
15:27:33,590 ERROR [STDERR] at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:492)
15:27:33,590 ERROR [STDERR] at org.jboss.rpc.WSClient.WSClient.getWSOutput(WSClient.java:39)
15:27:33,590 ERROR [STDERR] at org.jboss.porlet.iproject.iprojectportlet.doView(iprojectportlet.java:25)
15:27:33,590 ERROR [STDERR] at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:167)
15:27:33,590 ERROR [STDERR] at javax.portlet.GenericPortlet.render(GenericPortlet.java:407)
PLease help me to resolve this issue.
Thanks,
Elangovan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983953#3983953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983953
18 years, 1 month