javaee / metro-wsit

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

WCF request message with unprefixed Ping tag causes Tango endpoint to regard message body text to be null #653

Open glassfishrobot opened 17 years ago

glassfishrobot commented 17 years ago

With jsr109 from java RM simple example using annotations: @WebService(serviceName="ping", targetNamespace="http://tempuri.org/") (to achieve that advertised wsdl be close to that of WCF RM hosted client service's native endpoints - so as to make WCF -> Java tests work) with Ping.java jsr109 implementation class (as well as: @WebMethod(operationName="Ping", action="urn:wsrm:Ping") @Oneway and for the same reason) and applying WebParam annotation to method header: public void Ping(@WebParam(name="Text") String text) { WCF (hosted client service) client sends oneway message containing <<<

Microsoft-3

</s:Body> <<< which fails to deliver its text contents as the above part is apparently disregarded by Ping service. When the above part is changed to: <<<

Microsoft-3 >>> the text input is got as expected. It may be MS that is failing to adhere to specification or possibly this bug can be re-classified to RFE only. I will add sources and log for reproducing the problem. #### 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: Correcting copy paste typo: <<<

Microsoft-3

</s:Body> <<<

This is the failing message part form WCF client.

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=397) jsr109 SEI java source

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=398) wsit-*.xml file for the endpoint

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=399) part of server log showing WCF request and Ping.java output

glassfishrobot commented 17 years ago

daveronge@java.net said: (Caught NPE is secondary here as originally the test case relies upon having some specific info in the message.)

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=400) "Well-formed" message that succeeds with corresponding SEI output log

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=401) WCF request msg with corrected Ping tag with corresponding Ping.java output log

glassfishrobot commented 17 years ago

daveronge@java.net said: (Again the NPE here is secondary due to message content - this case is OK.)

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=402) Failing WCF message reproduce using modified EndpointRequester

glassfishrobot commented 17 years ago

daveronge@java.net said: Last three attachments come from running EndpointRequester suited to send arbitrary messages first to create sequence and then send one Ping message. (The sequence identifier had to be substituted accordingly each time.) Appended are source messages used to feed the sequence (they are better formatted). Sequence identifiers may not correspond as they have been substituted on the fly.

(CreateSequence: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing"> <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</a:Action> urn:uuid:55373da3-6620-4b5e-962f-b41b7ee36ae6</a:MessageID> http://129.150.124.103:8080/jsr109oneway/ping</a:To> </s:Header>

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

</s:Body> </s:Envelope> ) Correct Tango client message: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:r="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:a="http://www.w3.org/2005/08/addressing">

uuid:a0456d56-8a80-4f75-987f-50169e834833 3 urn:wsrm:Ping [http://129.150.124.103:8080/jsr109oneway/ping](http://129.150.124.103:8080/jsr109oneway/ping) 3 [TEST PING] Q:/tango-new/tango/qe-tests/jax-rm/test/interop/destjsr109onewayPingSessionRecord2.log;sendPing2 Failing MS message: uuid:a4ddd471-ce61-4ef3-9b1a-6448f0aca69f 3 urn:wsrm:Ping [http://129.150.124.103:8080/jsr109oneway/ping](http://129.150.124.103:8080/jsr109oneway/ping) Microsoft-3 Corrected above message that succeeds: uuid:e05cb38a-c77b-4dcb-8206-5b994e1b873c 3 urn:wsrm:Ping [http://129.150.124.103:8080/jsr109oneway/ping](http://129.150.124.103:8080/jsr109oneway/ping) Microsoft-3 the only difference (except of sequence identifiers) being in the ns23 prefix added manually.
glassfishrobot commented 17 years ago

daveronge@java.net said: Nevertheless when going back to #652 (now invalid) there is something to say regarding letter case in xml element name: when Ping method header is changed from: public void Ping(@WebParam(name="Text") String text) { to: public void Ping(@WebParam(name="text") String text) { the Tango implementation correctly propagates this to corresponding xml schema: (http://129.150.124.64:8080/jsr109oneway/ping?xsd=1) <?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:tns="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://tempuri.org/">

Tango client created by wsimport adheres to that and sends <<< 3 [TEST PING] Q:/tango-new/tango/qe-tests/jax-rm/test/interop/destjsr109onewayPingSessionRecord2.log;sendPing2 >>> with lower case "" accordingly. The WCF client does not do it - it sends upper case. I will check if it is also the case with WCF client created by wsutil * then it would be bug to MS - as hosted client service is not fully configurable and possibly only follows its native services pattern.
glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=403) Service war with "text" in lowercase

glassfishrobot commented 17 years ago

daveronge@java.net said: Created an attachment (id=404) Service war with "Text" uppercase corresponding to the attached sources

glassfishrobot commented 17 years ago

daveronge@java.net said: When native WCF client is created using svcutil.exe and run against the endpoint it sends: <<< <Ping xmlns:ns8="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

3 [TEST PING] Q:/tango-new/tango/qe-tests/jax-rm/test/interop/destjsr109onewayPingSessionRecord2.log;sendPing2

which succeeds.

Either xmlns="" in text (which is correctly lowercase there - so no issue concerning letter case with WCF) or ns-prefix in "<ns7:Ping xmlns:ns7=..." will handle the success.

When none of these two deitails is present the message will deliver null text body.

Possibly renaming name="text" to name="anythingelse" in a schema would help but MS hosted client service will probably disregard the element name and go on with "Text".

glassfishrobot commented 17 years ago

vivekp@java.net said: The schema is elementForumDefault="unqualified" (default), so a child node needs to be in no namespace, for this reason if MS sends:

Microsoft-3

</s:Body>

node appears in the parent element namespace. and so it unmrshalls in to null. the currect XML instance could be: Microsoft-3 or Microsoft-3 Here JAXb can be little relax in processing such instances. I have opened an RFE [https://jaxb.dev.java.net/issues/show_bug.cgi?id=403](https://jaxb.dev.java.net/issues/show_bug.cgi?id=403) on JAXB. Once such support is available JAX-WS RI can allow support of such XML instances. I am chaning the request to RFE.
glassfishrobot commented 16 years ago

jitu@java.net said: assigning it to myself

glassfishrobot commented 17 years ago

File: jsr109oneway.war Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: jsr109oneway.war Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: log_Tango_success_rq_message.xml Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: log_WCF_corrected_rq_message.xml Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: log_WCF_reproduced.xml Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: log_WCF_rq_message.xml Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: Ping.java Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

File: wsit-indigo2tango.msdriven.jsr109oneway.server.Ping.xml Attached By: daveronge@java.net

glassfishrobot commented 17 years ago

Was assigned to jitu@java.net

glassfishrobot commented 7 years ago

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