You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Quach, Dan" <da...@acquitygroup.com> on 2008/01/09 00:56:00 UTC

with axis api, can i submit a soap request with my own payload?

I know with the axis api i can use a 'service' object to submit requests
(like the example)

public class TestClient {

6     public static void main(String [] args) {

7       try {



8         String endpoint =




9             "http://ws.apache.org:5049/axis/services/echo
<http://ws.apache.org:5049/axis/services/echo> ";

10  

11        Service  service = new Service();

12        Call     call    = (Call) 




service.createCall();

13  

14        call.setTargetEndpointAddress( new java.net.URL(endpoint) );

15        call.setOperationName(new QName("http://soapinterop.org/


<http://soapinterop.org/> ", echoString"));



16  

17        String ret = (String) call.invoke( new Object[] { "Hello!" }
);

18  

19        System.out.println("Sent 'Hello!', got '" + ret + "'");




20      } catch (Exception e) {



21        System.err.println(e.toString());

22      }

23    }

24  }






But does an api exist where I can send a request in a soap envelope with
my own payload short of using a regular http post? 


POST /crowd/services/SecurityServer HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.4
Host: 127.0.0.1:1234 <http://127.0.0.1:1234/> 
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 686

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> "
xmlns:xsd="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> " xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">
      <soapenv:Body>
       MY OWN PAYLOAD (A Java String for example)
      </soapenv:Body> 
   </soapenv:Envelope>


thanks!

 

Dan Quach

Sr. Associate

 

Acquity Group

19800 MacArthur Blvd, Suite 1200
Irvine, California 92614  USA

p: (949) 838-1106       

 f: (949) 838-1101

dan.quach@acquitygroup.com    www.acquitygroup.com
<http://www.acquitygroup.com/>  

 

 

MAKING OPTIMAL POSSIBLE

 

 

All information in this message is proprietary and confidential.