This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes Add complex type to axis2 sample code Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Add complex type to axis2 sample code" Watch "Add complex type to axis2 sample code" New topic
Author

Add complex type to axis2 sample code

Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 294
Hi
Is it possible to add complex type to the following sample code?
I will be glad to get some guidance

Thank you
Sharon

Complex:
public class myClass(){
int instance id;
String instanceName;
ArrayList arr ;
}

//Axis2 Sample Code :
import org.apache.axiom.om.*;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.*;


public class EchoBlockingClient {
private static EndpointReference targetEPR = new EndpointReference(
"http://127.0.0.1:8080/axis2/services/MyService");
public static void main(String[] args) {
try {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace ns = fac.createOMNamespace("http://soapinterop.org/", "ns1");
OMElement payload = fac.createOMElement("echoString", ns);
payload.setText("Hello!");
Options options = new Options();
ServiceClient client = new ServiceClient();
options.setTo(targetEPR);
OMElement result = client.sendReceive(payload);

} catch (AxisFault axisFault) {
axisFault.printStackTrace();
}

}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add complex type to axis2 sample code
 
Similar Threads
Axis2 (1.5) - AxisFault: Transport error: 404 Error
Creating Service and Client using AXIOM
org.apache.axis2.AxisFault exception - Operation not Found
org.apache.axis2.AxisFault exception - Operation not Found
How to improve the performance of web service