Solved

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

Posted on 2007-11-19
1
3,809 Views
Last Modified: 2009-04-21
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 ?

0
Comment
Question by:aquasw
1 Comment
 
LVL 9

Accepted Solution

by:
ysnky earned 500 total points
ID: 20314568
why dont you use wsdl2java tool to generate needed classes
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 213
egit plugin on eclipse 8 82
HashTable highest marks enumeration alternative 9 43
How do I remove an object from a 3 40
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question