Link to home
Start Free TrialLog in
Avatar of aquasw
aquasw

asked on

how to change in axis "soapenv" to "SOAP-ENV"

Hi Experts

I am using axis web services client

this is my  code :
                     try {
                       String endpoint =
                           "http://10.202.202.222:5050";
             
                      Service  service = new Service();
                      Call     call    = (Call) service.createCall();
               
                      call.setTargetEndpointAddress( new java.net.URL(endpoint) );
                      call.setOperationName(new QName("RV-Get-Default-SIP-Message"));
                     
                      String ret = (String) call.invoke( new Object[] {  } );
               
                    } catch (Exception e) {
                      System.err.println(e.toString());
                    }
                  }


it generates this xml


<?xml version="1.0" encoding="UTF-8"?>
<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>
<RV-Get-Default-SIP-Message soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</soapenv:Body>
</soapenv:Envelope>

the server doesn't get this xml request, because it needs that it will it will write SOAP-ENV instead of soapenv.

the xml should be like this

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ ">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<RV-Get-Default-SIP-Message/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

does any one know how to change soapenv to SOAP-ENV ?

ASKER CERTIFIED SOLUTION
Avatar of ysnky
ysnky
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial