xml - How to remove the "new" prefix from several attributes of the element in the request to the SOAP service? -


i have wsdl. using wsdl2java have created java classes , add realization. after created project in soap ui receive next xml request: enter image description here

the problem have hardcoded client use 1 of operation of web sevice , client not work if new prefix exist. how remove new prefix login , password attributes of authdata element?

update

when call web-service that:

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sin="http://my.comp/2010/webservice/service" xmlns:new="http://www.webservice.namespace">    <soapenv:header/>    <soapenv:body>       <sin:authdata>          <!--optional:-->          <new:login>121212</new:login>          <!--optional:-->          <new:password>12121</new:password>       </sin:authdata>    </soapenv:body> </soapenv:envelope> 

it works fine. when delete prefic new receive thw mistake:

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">    <soap:body>       <soap:fault>          <faultcode>soap:client</faultcode>          <faultstring>unmarshalling error: unexpected element (uri:"", local:"login"). expected elements &lt;{http://new.webservice.namespace}login>,&lt;{http://new.webservice.namespace}password></faultstring>       </soap:fault>    </soap:body> </soap:envelope> 

as said problem cl;ient can't send request new prefix.

perfect day: ask question , answer himself. time later. in case need correct package-info.java class , change elementformdefault = javax.xml.bind.annotation.xmlnsform.qualified) unqualified in it. these problems have been avoided if during build classes generate automatically jaxb2-maven-plugin (whuch in case can not use due project structure).


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -