Solved

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

Posted on 2007-11-19
1
3,757 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Increment alphanumeric sequence 6 80
Java asynchronous logging 4 34
github account with ecipse 1 20
Java Timer (static) 9 18
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now