axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: [Axis 2][1.0] RPCMessageReceiver with Document/Literal
Date Sat, 27 May 2006 15:48:39 GMT
Hi Suyoug;

 It seems to me that this is a bug in Axis2 need to fix before next
release, can u please create JIRA so that we will not forget to fix this

Suyog Gandhi wrote:

>Basically to summerize my problem,
>
>1) I wrote my simple Java class which has few public methods, which
>returns some complex type objects.
>2) I wrote my service.xml with RPCMessageReceiver, cause
>RAWMessageReceivers will not generate WSDL for me.
>3) I deployed the service.
>4) Now I generated client-stub by using 2 different data bindings. ( And
>wrote corresponding clients to test).
>	- xmlbean : Server side has returned my call properly. While
>unmarshalling, client-stub gives me "Data Binding error" caused by
>"document element namespace mismatch" exception.  
>	- ADB : Server side has returned my call properly. While
>unmarshalling, client-stub gives me "NullPointerException". 
>I have not tried another data bindings.
>
>I hope the problem is clear, and somebody can make sense out of it to
>provide me with solution.
>
>Thanks & Regards,
>Suyog
>
>
>-----Original Message-----
>From: Suyog Gandhi [mailto:sgandhi@vistaar.com]
>Sent: Wednesday, May 24, 2006 5:27 PM
>To: axis-user@ws.apache.org
>Subject: RE: [Axis 2][1.0] RPCMessageReceiver with Document/Literal
>
>
>Some more info:
>
>Now I used following code to create client stub: ( ADB databinding, in
>previous case I was using xmlbeans data binding)
>C:\WebService\WS_MDSClient2>c:\axis2_1.0\bin\WSDL2Java -p
>com.vistaar.clemenza.shared.webs.stub -uri
>http://sgandhi2-d:8100/vistaar/services/WS_MDS32
>WSDL sholdn't be different, but I am attaching it again. Also attaching
>new Client.
>
>Client Console Log: 
>"C:\Program Files\Java\jdk1.5.0_05\bin\java" -Didea.launcher.port=7533
>"-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA
>5.1\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\charsets.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\deploy.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\javaws.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\jce.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\jsse.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\plugin.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\dnsns.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\localedata.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\sunjce_provider.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\sunpkcs11.jar;C:\WebService\WS_MDS32C
>lient\classes;C:\axis2_1.0\lib\axiom-api-1.0.jar;C:\axis2_1.0\lib\axiom-
>impl-1.0.jar;C:\axis2_1.0\lib\jaxme2-0.5.1.jar;C:\axis2_1.0\lib\geronimo
>-spec-jms-1.1-rc4.jar;C:\axis2_1.0\lib\neethi-1.0.1.jar;C:\axis2_1.0\lib
>\jaxmejs-0.5.1.jar;C:\axis2_1.0\lib\axis2-jibx-1.0.jar;C:\axis2_1.0\lib\
>jaxen-1.1-beta-8.jar;C:\axis2_1.0\lib\geronimo-spec-javamail-1.3.1-rc5.j
>ar;C:\axis2_1.0\lib\jaxmexs-0.5.1.jar;C:\axis2_1.0\lib\wsdl4j-1.5.2.jar;
>C:\axis2_1.0\lib\axis2-tools-1.0.jar;C:\axis2_1.0\lib\commons-httpclient
>-3.0.jar;C:\axis2_1.0\lib\backport-util-concurrent-2.1.jar;C:\axis2_1.0\
>lib\geronimo-spec-activation-1.0.2-rc4.jar;C:\axis2_1.0\lib\xbean-2.1.0.
>jar;C:\axis2_1.0\lib\axis2-codegen-1.0.jar;C:\axis2_1.0\lib\servletapi-2
>.3.jar;C:\axis2_1.0\lib\XmlSchema-1.0.2.jar;C:\axis2_1.0\lib\commons-cod
>ec-1.3.jar;C:\axis2_1.0\lib\axis2-xmlbeans-1.0.jar;C:\axis2_1.0\lib\anno
>gen-0.1.0.jar;C:\axis2_1.0\lib\axis2-kernel-1.0.jar;C:\axis2_1.0\lib\jax
>meapi-0.5.1.jar;C:\axis2_1.0\lib\stax-api-1.0.jar;C:\axis2_1.0\lib\log4j
>-1.2.13.jar;C:\axis2_1.0\lib\axis2-adb-1.0.jar;C:\axis2_1.0\lib\axiom-do
>m-1.0.jar;C:\axis2_1.0\lib\stax-utils-20060501.jar;C:\axis2_1.0\lib\comm
>ons-logging-1.0.4.jar;C:\axis2_1.0\lib\commons-fileupload-1.0.jar;C:\axi
>s2_1.0\lib\wstx-asl-2.9.3.jar;C:\Program Files\JetBrains\IntelliJ IDEA
>5.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain
>com.vistaar.clemenza.shared.webs.client.WSClient
>log4j:WARN No appenders could be found for logger
>(org.apache.axiom.om.impl.builder.StAXOMBuilder).
>log4j:WARN Please initialize the log4j system properly.
>Calling ws_init .........
>After ws_init ......... return value: Container is up............ 
>Calling refreshMDSProxiesRequest .........
>After refreshMDSProxiesRequest .........retur value true
><return><example1:getVersion
>xmlns:example1="http://example1.org/example1"><example1:Text>Axis2
>Version String </example1:Text></example1:getVersion></return>
>Exception in thread "main" org.apache.axis2.AxisFault:
>java.lang.NullPointerException
>	at
>org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
>peration.java:287)
>	at
>com.vistaar.clemenza.shared.webs.stub.WS_MDS32Stub.getAllDimensionInfo(W
>S_MDS32Stub.java:1363)
>	at
>com.vistaar.clemenza.shared.webs.client.WSClient.main(WSClient.java:49)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
>a:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>Impl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at
>com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>Caused by: java.lang.Exception: org.apache.axis2.AxisFault:
>java.lang.NullPointerException; nested exception is: 
>	org.apache.axiom.om.OMException: java.lang.NullPointerException
>	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
>	at
>org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RP
>CMessageReceiver.java:136)
>	at
>org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abst
>ractInOutSyncMessageReceiver.java:37)
>	at
>org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
>	at
>org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
>t(HTTPTransportUtils.java:284)
>	at
>org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>tionFilterChain.java:252)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>erChain.java:173)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>e.java:213)
>	at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>e.java:178)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>:126)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>:105)
>	at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>java:107)
>	at
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
>48)
>	at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
>8)
>	at
>org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
>essConnection(Http11BaseProtocol.java:663)
>	at
>org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
>.java:527)
>	at
>org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
>erWorkerThread.java:80)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
>.java:684)
>	at java.lang.Thread.run(Thread.java:595)
>Caused by: org.apache.axiom.om.OMException:
>java.lang.NullPointerException
>	at
>org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:2
>06)
>	at
>org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:298)
>	at
>org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:58
>4)
>	at
>org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:118)
>	at
>org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:
>240)
>	at
>org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:
>197)
>	at
>org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RP
>CMessageReceiver.java:128)
>	... 20 more
>Caused by: java.lang.NullPointerException
>	at
>org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.getEve
>ntType(WrappingXMLStreamReader.java:141)
>	at
>org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.process
>Properties(ADBXMLStreamReaderImpl.java:964)
>	at
>org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(AD
>BXMLStreamReaderImpl.java:807)
>	at
>org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>	at
>org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1
>23)
>	... 26 more
>
>	at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
>	... 8 more
>
>Process finished with exit code 1
>
>
>
>-----Original Message-----
>From: Suyog Gandhi [mailto:sgandhi@vistaar.com]
>Sent: Wednesday, May 24, 2006 10:57 AM
>To: axis-user@ws.apache.org
>Subject: RE: [Axis 2][1.0] RPCMessageReceiver with Document/Literal
>
>
>Hello Deepal,
>Please find attached WSDL file and other information, which might be
>useful to identify the problem.
>
>Command to create Client Stub:
>C:\WebService\WS_MDSClient2>c:\axis2_1.0\bin\WSDL2Java -d xmlbeans -p
>com.vistaar.clemenza.shared.webs.stub -uri
>http://sgandhi2-:8100/vistaar/services/WS_MDS32?wsdl
>
>
>Client.java
>***********************
>import com.vistaar.clemenza.shared.webs.stub.*;
>import com.vistaar.clemenza.shared.webs.xsd.GetDimensionNamesDocument;
>import
>com.vistaar.clemenza.shared.webs.xsd.GetDimensionNamesResponseDocument;
>import org.apache.axiom.om.OMElement;
>
>public class Client {
>
>    private static final String WSDL_ENDPOINT =
>"http://sgandhi2-d:8100/vistaar/services/WS_MDS32";
>
>    public static void main(String args[]) throws Exception {
>         System.out.println("Start Client ......... ");
>        WS_MDS32Stub stub = new  WS_MDS32Stub(null,WSDL_ENDPOINT);
>        GetDimensionNamesDocument reqDoc00 =
>GetDimensionNamesDocument.Factory.newInstance();
>        GetDimensionNamesDocument.GetDimensionNames reqDoc01 =
>reqDoc00.addNewGetDimensionNames();
>        GetDimensionNamesResponseDocument resDoc00 =
>stub.getDimensionNames(reqDoc00);
>        GetDimensionNamesResponseDocument.GetDimensionNamesResponse
>resDoc01 = resDoc00.getGetDimensionNamesResponse();
>        String[] retArray = resDoc01.getReturnArray();
>        System.out.println("Dimensions :");
>        for(int i = 0; i < retArray.length; i++){
>            System.out.println(retArray[i]);
>        }
>    }
>}
>****************************************
>
>Console Log:
>"C:\Program Files\Java\jdk1.5.0_05\bin\java" -Didea.launcher.port=7532
>"-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA
>5.1\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\charsets.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\deploy.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\javaws.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\jce.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\jsse.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\plugin.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\dnsns.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\localedata.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\sunjce_provider.jar;C:\Program
>Files\Java\jdk1.5.0_05\jre\lib\ext\sunpkcs11.jar;C:\WebService\WS_MDSCli
>ent2\classes;C:\axis2_1.0\lib\axiom-api-1.0.jar;C:\axis2_1.0\lib\axiom-i
>mpl-1.0.jar;C:\axis2_1.0\lib\jaxme2-0.5.1.jar;C:\axis2_1.0\lib\geronimo-
>spec-jms-1.1-rc4.jar;C:\axis2_1.0\lib\neethi-1.0.1.jar;C:\axis2_1.0\lib\
>jaxmejs-0.5.1.jar;C:\axis2_1.0\lib\axis2-jibx-1.0.jar;C:\axis2_1.0\lib\j
>axen-1.1-beta-8.jar;C:\axis2_1.0\lib\geronimo-spec-javamail-1.3.1-rc5.ja
>r;C:\axis2_1.0\lib\jaxmexs-0.5.1.jar;C:\axis2_1.0\lib\wsdl4j-1.5.2.jar;C
>:\axis2_1.0\lib\axis2-tools-1.0.jar;C:\axis2_1.0\lib\commons-httpclient-
>3.0.jar;C:\axis2_1.0\lib\backport-util-concurrent-2.1.jar;C:\axis2_1.0\l
>ib\geronimo-spec-activation-1.0.2-rc4.jar;C:\axis2_1.0\lib\xbean-2.1.0.j
>ar;C:\axis2_1.0\lib\axis2-codegen-1.0.jar;C:\axis2_1.0\lib\servletapi-2.
>3.jar;C:\axis2_1.0\lib\XmlSchema-1.0.2.jar;C:\axis2_1.0\lib\commons-code
>c-1.3.jar;C:\axis2_1.0\lib\axis2-xmlbeans-1.0.jar;C:\axis2_1.0\lib\annog
>en-0.1.0.jar;C:\axis2_1.0\lib\axis2-kernel-1.0.jar;C:\axis2_1.0\lib\jaxm
>eapi-0.5.1.jar;C:\axis2_1.0\lib\stax-api-1.0.jar;C:\axis2_1.0\lib\log4j-
>1.2.13.jar;C:\axis2_1.0\lib\axis2-adb-1.0.jar;C:\axis2_1.0\lib\axiom-dom
>-1.0.jar;C:\axis2_1.0\lib\stax-utils-20060501.jar;C:\axis2_1.0\lib\commo
>ns-logging-1.0.4.jar;C:\axis2_1.0\lib\commons-fileupload-1.0.jar;C:\axis
>2_1.0\lib\wstx-asl-2.9.3.jar;C:\WebService\WS_MDSClient2\resources;C:\Pr
>ogram Files\JetBrains\IntelliJ IDEA 5.1\lib\idea_rt.jar"
>com.intellij.rt.execution.application.AppMain Client
>Start Client ......... 
>log4j:WARN No appenders could be found for logger
>(org.apache.axiom.om.impl.builder.StAXOMBuilder).
>log4j:WARN Please initialize the log4j system properly.
>Exception in thread "main" java.lang.RuntimeException: Data binding
>error
>	at
>com.vistaar.clemenza.shared.webs.stub.WS_MDS32Stub.fromOM(WS_MDS32Stub.j
>ava:4300)
>	at
>com.vistaar.clemenza.shared.webs.stub.WS_MDS32Stub.getDimensionNames(WS_
>MDS32Stub.java:1207)
>	at Client.main(Client.java:29)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
>a:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>Impl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at
>com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>Caused by: org.apache.xmlbeans.XmlException: error: The document is not
>a getDimensionNamesResponse@http://webs.shared.clemenza.vistaar.com/xsd:
>document element namespace mismatch expected
>"http://webs.shared.clemenza.vistaar.com/xsd" got
>"http://org.apache.axis2/xsd"
>	at
>org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:452
>)
>	at
>org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:357)
>	at
>org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:850)
>	at
>org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
>	at
>org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoa
>derBase.java:231)
>	at
>com.vistaar.clemenza.shared.webs.xsd.GetDimensionNamesResponseDocument$F
>actory.parse(GetDimensionNamesResponseDocument.java:183)
>	at
>com.vistaar.clemenza.shared.webs.stub.WS_MDS32Stub.fromOM(WS_MDS32Stub.j
>ava:4202)
>	... 7 more
>
>Process finished with exit code 1
>
>Thanks & Regards,
>Suyog
>
>-----Original Message-----
>From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>Sent: Wednesday, May 24, 2006 5:38 AM
>To: axis-user@ws.apache.org
>Subject: Re: [Axis 2][1.0] RPCMessageReceiver with Document/Literal
>
>
>Hi Suyou;
>Can u pls follow the following steps and see wt happen
>  - create services.xml setting RPCMessageReciver as the message
>receiver
>  - then deploy the service in SimpleHttpServer or tomcat (or any app
>server)
>  - Then get the wsdl for that service (if it is tomcat go to services
>link and from that u can get the wsdl)
> - generate client using that wsdl
> - invoke the service
>
>
>Suyog Gandhi wrote:
>
>  
>
>>I want to generate WSDL from my class. To see that WSDL I will have to
>>have RPCMessageReceiver.
>> 
>>With RPCMessageReceiver, when I make a call on the WebService, it
>>gives me "Data Binding Error" stating that "document element namespace
>>mismatch".
>> 
>>Can somebody suggest how to resolve this.
>> 
>>Thanks in advance.
>> 
>>Suyog
>>    
>>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message