How to remove namespace in saop using java?

Posted by atknatk on Stack Overflow See other posts from Stack Overflow or by atknatk
Published on 2013-11-05T15:50:53Z Indexed on 2013/11/05 15:52 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

I have imported a WSDL and use it to send a SOAP request. It looks like this:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
    <version xmlns="http://www.tempuri.org">
        <parRequest xmlns="">
            <faturaUUID>[string?]</faturaUUID>
            <faturaNo>[string?]</faturaNo>
            <faturaReferansNo>[string?]</faturaReferansNo>
            <durumKodu>[int]</durumKodu>
            <durumAciklamasi>[string?]</durumAciklamasi>
        </parRequest>
    </version>
</Body>
</Envelope>

But I want to remove

xmlns=""

such as

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
    <acceptResponse xmlns="http://tempuri.org/">
        <responseRes>
            <faturaUUID>[string?]</faturaUUID>
            <faturaNo>[string?]</faturaNo>
            <faturaReferansNo>[string?]</faturaReferansNo>
            <durumKodu>1</durumKodu>
            <durumAciklamasi>[string?]</durumAciklamasi>
        </responseRes>
    </acceptResponse>
</Body>
</Envelope>

My web service code:

@WebService(serviceName = "test", targetNamespace = "http://www.tempuri.org")
public class ErpEntServ {

@WebMethod(operationName = "version")
public String version(@WebParam(name = "parRequest") acceptResponse acceptResponse) {
    return "0";
}

how to remove it?

I try to @WebParam(name = "parRequest",targetNamespace = "http://www.tempuri.org") acceptResponse acceptResponse but it did not.

Thank you for helping

© Stack Overflow or respective owner

Related posts about java

Related posts about web-services