javaee / metro-wsit

https://javaee.github.io/metro-wsit/
Other
9 stars 24 forks source link

Sun client cannot access message text in more complex response schema #436

Closed glassfishrobot closed 17 years ago

glassfishrobot commented 17 years ago

MS -> Sun service RM interop tests using MS-supplied hosted client services failed with requestresponse with the only more-specific error of "Object reference not set to an instance of an object" in IIS log. Then a simple testcase involving Java client addressing the same Sun service endpoint shows that Java client gets apparently viable message from the Sun service (that was created from our MS service endpoints with the slightest possible changes) but it gets null value in place of PingResponse.BodyType. Then NullPointerException is got when applying getValue() to get response contents. Bellow is the snippet that shows request message and its response after sequence has been correctly created. ..... [jvmTestRunner] --[HTTP request]-- [jvmTestRunner] Content-Type: application/soap+xml; charset=utf-8;action="urn:wsrm:EchoString" [jvmTestRunner] Accept: application/soap+xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, /**; q=.2 [jvmTestRunner] <?xml version="1.0" ?><S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"><To xmlns="http://www.w3.org/2005/08/addressing">[http://localhost:8080/requestresponse/echo](http://localhost:8080/requestresponse/echo)<Action xmlns="http://www.w3.org/2005/08/addressing">urn:wsrm:EchoString<ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> [jvmTestRunner]

[http://www.w3.org/2005/08/addressing/anonymous](http://www.w3.org/2005/08/addressing/anonymous)

[jvmTestRunner] <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:936af1a3-7570-4983-947c-fae6098aa19e<ns2:Sequence xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm" xmlns:ns4="http://www.w3.org/2005/08/addressing">uuid:6ca3003d-a171-4e3a-b4fb-1fb7e505774b</ns2:Identifier>1</ns2:MessageNumber></ns2:Sequence><ns2:AckRequested xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm" xmlns:ns4="http://www.w3.org/2005/08/addressing">uuid:6ca3003d-a171-4e3a-b4fb-1fb7e505774b</ns2:Identifier></ns2:AckRequested></S:Header><PingRequest xmlns="http://tempuri.org/">This should be the message textseq 1</S:Body></S:Envelope>-------------------- [jvmTestRunner] --[HTTP response 200]-- [jvmTestRunner] Date: Thu, 08 Mar 2007 17:46:48 GMT [jvmTestRunner] X-powered-by: Servlet/2.5 [jvmTestRunner] Content-length: 1646 [jvmTestRunner] Content-type: application/soap+xml;charset=utf-8 [jvmTestRunner] null: HTTP/1.1 200 OK [jvmTestRunner] Server: Sun Java System Application Server 9.1 [jvmTestRunner] <?xml version="1.0" ?><S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"><To xmlns="http://www.w3.org/2005/08/addressing">[http://www.w3.org/2005/08/addressing/anonymous](http://www.w3.org/2005/08/addressing/anonymous)<Action xmlns="http://www.w3.org/2005/08/addressing">urn:wsrm:EchoStringResponse<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:9af30da8-7049-4ec6-9336-d9a40598e6f2<RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:936af1a3-7570-4983-947c-fae6098aa19e<ns2:Sequence xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm" xmlns:ns4="http://www.w3.org/2005/08/addressing">uuid:f895ead8-6075-47a9-aceb-987d956fdc2c</ns2:Identifier>1</ns2:MessageNumber></ns2:Sequence><ns2:AckRequested xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm" xmlns:ns4="http://www.w3.org/2005/08/addressing">uuid:f895ead8-6075-47a9-aceb-987d956fdc2c</ns2:Identifier></ns2:AckRequested><ns2:SequenceAcknowledgement xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm" xmlns:ns4="http://www.w3.org/2005/08/addressing">uuid:6ca3003d-a171-4e3a-b4fb-1fb7e505774b</ns2:Identifier><ns2:AcknowledgementRange Upper="1" Lower="1"/></ns2:SequenceAcknowledgement></S:Header><PingResponse xmlns="http://tempuri.org/">Text is This should be the message text Sequence is seq 1.</PingResponse.BodyType></S:Body></S:Envelope>-------------------- .....

Environment

Operating System: All Platform: All

Affected Versions

[current]

glassfishrobot commented 17 years ago

Reported by daveronge@java.net

glassfishrobot commented 17 years ago

daveronge@java.net said: stacktrace of the exception raised on getValue(): ... [jvmTestRunner] AAAAB7 [jvmTestRunner] JAXBElement is null... [jvmTestRunner] java.lang.NullPointerException [jvmTestRunner] at tango2tango.requestresponse.client.ReliableRequestresponseJavaClientTest.sendEcho(ReliableRequestresponseJavaClientTest.java:122) [jvmTestRunner] at tango2tango.requestresponse.client.ReliableRequestresponseJavaClientTest.testSendEcho1(ReliableRequestresponseJavaClientTest.java:185) [jvmTestRunner] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jvmTestRunner] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [jvmTestRunner] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jvmTestRunner] at java.lang.reflect.Method.invoke(Method.java:585) [jvmTestRunner] at junit.framework.TestCase.runTest(TestCase.java:154) [jvmTestRunner] at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:136) [jvmTestRunner] at junit.framework.TestResult$1.protect(TestResult.java:106) [jvmTestRunner] at junit.framework.TestResult.runProtected(TestResult.java:124) [jvmTestRunner] at junit.framework.TestResult.run(TestResult.java:109) [jvmTestRunner] at junit.framework.TestCase.run(TestCase.java:118) [jvmTestRunner] at org.netbeans.junit.NbTestCase.run(NbTestCase.java:122) [jvmTestRunner] at junit.framework.TestSuite.runTest(TestSuite.java:208) [jvmTestRunner] at junit.framework.TestSuite.run(TestSuite.java:203) [jvmTestRunner] at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:167) [jvmTestRunner] at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:118) [jvmTestRunner] at org.netbeans.xtest.plugin.jvm.JUnitTestRunnerLauncher.main(JUnitTestRunnerLauncher.java:41)

glassfishrobot commented 17 years ago

daveronge@java.net said: attaching the logs and the zipped sources of the simple test case

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=297) GF server log corresponding to single run of simple testcase

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=298) stdout of the testrun

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=299) Zipped workspace containing instructions to run it.

glassfishrobot commented 17 years ago

daveronge@java.net said: Increasing priority as interoperability is concerned and no activity seen

glassfishrobot commented 17 years ago

vivekp@java.net said: As it looks like the payload elelemt might not be matching with the WSDL schema. I discussed this issue with bhakti and it looks like you are expecting WCF client to interoperate with wsit endpoint and not sure if you have genrated the WCF client stub by running svcutil.

Anyway, for me to do anything with this issue you have to provide me the WSDL and schema and also which operation you are trying to invoke.

glassfishrobot commented 17 years ago

daveronge@java.net said: Attached tango.zip contains all the sources. Though this issue has been opened due to MS->Sun failing testcase, the attached sources are Java->Java and this fails too. I admit there can be a config issue in it but I am not able to solve it even with the help of others. Path to source wsdl for the service endpoint in the attached zip: tango.zip!\tango\qe-tests\jax-rm\standalone\src\tango2tango\requestresponse\server\etc\EchoService.wsdl

;schema in the same directory. Client binding files are in ../../client/etc/ and it is possible to run this test to repeat the error as described. The only component I did not attached in full length is the xtest-distribution module as this can be checked-out as described and I considered it to be a bit huge to put here as it stays unchanged for a long time. The operation name is EchoString.

glassfishrobot commented 17 years ago

vivekp@java.net said: Sorry, I dont know how to run these tests and dont want to go thru learn how to run these tests. Please send a standalone test that reproduces this problem.

glassfishrobot commented 17 years ago

vivekp@java.net said: Added mike and bhakti to take a look at it and point me to what I should be looking at to see if at all there is jaxws problem.

glassfishrobot commented 17 years ago

vivekp@java.net said: This is a testcase error. Endpoint IEchoStringImpl is creating incorrect response object and that results in to serializing different infoset than what was supposed to be received by the client and that causes the client to unmarshall it as null.

The code in endpoint impl class:

JAXBElement prbt = fact.createPingResponseBodyType(t);

Should be changed to

JAXBElement prbt = fact.createPingResponseEchoStringResponse(t);

This is because you want to create the type that corresponds to "echoStringResponse" element not "PingResponse.BodyType". createPingResponseEchoStringResponse() gives the correct object type. See the ObjectFactory for details.

glassfishrobot commented 17 years ago

daveronge@java.net said: verified, thanks both, Mike and Vivek

glassfishrobot commented 17 years ago

mmatula@java.net said: This issue was fixed before we created 1.0 branch, so the fix is in 1.0 -> setting target milestone to say so.

glassfishrobot commented 17 years ago

File: server.030807.log Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: tango.zip Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: testrun-03-08-18-45.log Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

Was assigned to vivekp@java.net

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA WSIT-436

glassfishrobot commented 17 years ago

Marked as incomplete on Tuesday, November 13th 2007, 11:46:28 pm