我创建了名为GroupServiceReadinessInterface的简单Web服务客户端,它扩展了org.apache.axis.client.Service(位于axis-1.2.1-patched.jar)。当我从测试类调用客户端时工作正常但在部署之后应用到bea weblogic 9 Web服务返回状态500并且没有来自Web服务的响应。我认为这是我的应用程序库和weblogic库之间的任何帮助。
公共类GroupServiceReadinessInterface_ServiceLocator扩展 org.apache.axis.client.Service实现 de.vodafone.ws.serviceready.GroupServiceReadinessInterface_Service {
public GroupServiceReadinessInterface_ServiceLocator() {
}
public GroupServiceReadinessInterface_ServiceLocator(
org.apache.axis.EngineConfiguration config) {
super(config);
}
public GroupServiceReadinessInterface_ServiceLocator(
java.lang.String wsdlLoc, javax.xml.namespace.QName sName)
throws javax.xml.rpc.ServiceException {
super(wsdlLoc, sName);
}
// Use to get a proxy class for GroupServiceReadinessPort
private java.lang.String GroupServiceReadinessPort_address = "http://vf_nb_group_service_readiness_service/GroupServiceReadinessServiceMock/GroupServiceReadinessInterface/GroupServiceReadinessPort";
public java.lang.String getGroupServiceReadinessPortAddress() {
return GroupServiceReadinessPort_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String GroupServiceReadinessPortWSDDServiceName = "GroupServiceReadinessPort";
public java.lang.String getGroupServiceReadinessPortWSDDServiceName() {
return GroupServiceReadinessPortWSDDServiceName;
}
public void setGroupServiceReadinessPortWSDDServiceName(
java.lang.String name) {
GroupServiceReadinessPortWSDDServiceName = name;
}
public de.vodafone.ws.serviceready.GroupServiceReadinessInterface_PortType getGroupServiceReadinessPort()
throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(GroupServiceReadinessPort_address);
} catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getGroupServiceReadinessPort(endpoint);
}
public de.vodafone.ws.serviceready.GroupServiceReadinessInterface_PortType getGroupServiceReadinessPort(
java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
de.vodafone.ws.serviceready.GroupServiceReadinessInterfaceBindingStub _stub = new de.vodafone.ws.serviceready.GroupServiceReadinessInterfaceBindingStub(
portAddress, this);
_stub.setPortName(getGroupServiceReadinessPortWSDDServiceName());
return _stub;
} catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setGroupServiceReadinessPortEndpointAddress(
java.lang.String address) {
GroupServiceReadinessPort_address = address;
}
/**
* For the given interface, get the stub implementation. If this service has
* no port for the given interface, then ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface)
throws javax.xml.rpc.ServiceException {
try {
if (de.vodafone.ws.serviceready.GroupServiceReadinessInterface_PortType.class
.isAssignableFrom(serviceEndpointInterface)) {
de.vodafone.ws.serviceready.GroupServiceReadinessInterfaceBindingStub _stub = new de.vodafone.ws.serviceready.GroupServiceReadinessInterfaceBindingStub(
new java.net.URL(GroupServiceReadinessPort_address),
this);
_stub.setPortName(getGroupServiceReadinessPortWSDDServiceName());
return _stub;
}
} catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException(
"There is no stub implementation for the interface: "
+ (serviceEndpointInterface == null ? "null"
: serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation. If this service has
* no port for the given interface, then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
Class serviceEndpointInterface)
throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("GroupServiceReadinessPort".equals(inputPortName)) {
return getGroupServiceReadinessPort();
} else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName(
"http://www.vodafone.com/vf/lig/groupServiceReadiness/service/v1",
"GroupServiceReadinessInterfaceMock");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName(
"http://www.vodafone.com/vf/lig/groupServiceReadinessMock/service/v1",
"GroupServiceReadinessPort"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName,
java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("GroupServiceReadinessPort".equals(portName)) {
setGroupServiceReadinessPortEndpointAddress(address);
} else { // Unknown Port Name
throw new javax.xml.rpc.ServiceException(
" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName,
java.lang.String address) throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}