---
title: "Simple Axis Client"
author: "dbscx"
date: "2011-01-17T14:01:08Z"
tags: []
categories: ["企业架构"]
slug: "simple-axis-client"
draft: false
lastmod: "2011-01-17T14:05:02Z"
id: 876395
url: "https://dbscx.iteye.com/blog/876395"
---

```
String endpoint = "http://127.0.0.1:8080/soap/services/Hello";
String namespace = "http://crea.com";
String method = "forword";

org.apache.axis.client.Service server = new org.apache.axis.client.Service();
org.apache.axis.client.Call call = (org.apache.axis.client.Call) server.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new javax.xml.namespace.QName(namespace, method));
String res = (String) call.invoke(new Object[] {param});
```