metro-jax-ws icon indicating copy to clipboard operation
metro-jax-ws copied to clipboard

JAX-WS returns NPE when the SOAP message doesn't have the prefix

Open Tomas-Kraus opened this issue 3 years ago • 0 comments

I have a Web Service created using JAX-WS, which accepts a Complex Type Input and returns back a string.

It expects the SOAP message to have prefix in the methodName tag otherwise it returns NPE. Whereas the same SOAP syntax works for other webservices created in Axis, Eclipse and .NET.

SOAP messages for comparison: Note: (hello tag in the SOAP Envelopes)

SOAP message generated from my WS Client:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> soapenv:Body 1 name 3 capname 2 </soapenv:Body> </soapenv:Envelope>

What JAX-WS expects:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://ws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> soapenv:Body q0:hello 1 name 3 capname 2 </q0:hello> </soapenv:Body> </soapenv:Envelope>

Environment

Web Service

Affected Versions

[2.2.1]

Source: https://github.com/javaee/metro-jax-ws/issues/1106 Author: glassfishrobot

Tomas-Kraus avatar Jun 02 '22 17:06 Tomas-Kraus