axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miller, Janet" <Mille...@pbworld.com>
Subject WS works in browser but not with client
Date Wed, 06 Jul 2005 01:10:29 GMT
I believe I've successfully deployed my local web service.  When I
access the following in my browser:
 
 
http://localhost:8080/axis/services/TZCServiceSoap?method=getTransaction
s
<http://localhost:8080/axis/services/TZCServiceSoap?method=getTransactio
ns>  
 
I get the result that I expect.  However, when I try to access the web
service via a Java client, it doesn't work.
I'm going crazy trying to figure out why this won't work!!!!  Any help
would be greatly appreciated.
Here's my client:
 
package pbf.hot;
 
import Sirit.ETTM.TZCServiceLocator;
import Sirit.ETTM.TZCService;
import Sirit.ETTM.TZCServiceSoap;
 
public class TestService {
 public static void main(String[] args) throws Exception {
  String test = null;
  TZCService service = new TZCServiceLocator();
  TZCServiceSoap port = service.getTZCServiceSoap();
  test = port.getTransactions("Test");
  System.out.println("Call Results:" + test);
 }
} 
 
Here's my TZCServiceLocator:
 
package Sirit.ETTM;
 
public class TZCServiceLocator extends org.apache.axis.client.Service
implements Sirit.ETTM.TZCService {
 
    public TZCServiceLocator() {
    }

    public TZCServiceLocator(org.apache.axis.EngineConfiguration config)
{
        super(config);
    }
 
    public TZCServiceLocator(java.lang.String wsdlLoc,
javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
        super(wsdlLoc, sName);
    }
 
    // Use to get a proxy class for TZCServiceSoap
    private java.lang.String TZCServiceSoap_address =
"http://localhost:8080/axis/TZCServiceSoap
<http://localhost:8080/axis/TZCServiceSoap> ";
 
    public java.lang.String getTZCServiceSoapAddress() {
        return TZCServiceSoap_address;
    }
 
    // The WSDD service name defaults to the port name.
    private java.lang.String TZCServiceSoapWSDDServiceName =
"TZCServiceSoap";
 
    public java.lang.String getTZCServiceSoapWSDDServiceName() {
        return TZCServiceSoapWSDDServiceName;
    }
 
    public void setTZCServiceSoapWSDDServiceName(java.lang.String name)
{
        TZCServiceSoapWSDDServiceName = name;
    }
 
    public Sirit.ETTM.TZCServiceSoap getTZCServiceSoap() throws
javax.xml.rpc.ServiceException {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(TZCServiceSoap_address);
        }
        catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getTZCServiceSoap(endpoint);
    }
 
    public Sirit.ETTM.TZCServiceSoap getTZCServiceSoap(java.net.URL
portAddress) throws javax.xml.rpc.ServiceException {
        try {
            Sirit.ETTM.TZCServiceSoapStub _stub = new
Sirit.ETTM.TZCServiceSoapStub(portAddress, this);
            _stub.setPortName(getTZCServiceSoapWSDDServiceName());
            return _stub;
        }
        catch (org.apache.axis.AxisFault e) {
            return null;
        }
    }
 
    public void setTZCServiceSoapEndpointAddress(java.lang.String
address) {
        TZCServiceSoap_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
(Sirit.ETTM.TZCServiceSoap.class.isAssignableFrom(serviceEndpointInterfa
ce)) {
                Sirit.ETTM.TZCServiceSoapStub _stub = new
Sirit.ETTM.TZCServiceSoapStub(new java.net.URL(TZCServiceSoap_address),
this);
                _stub.setPortName(getTZCServiceSoapWSDDServiceName());
                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 ("TZCServiceSoap".equals(inputPortName)) {
            return getTZCServiceSoap();
        }
        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://localhost:8080/axis/
<http://localhost:8080/axis/> ", "TZCServiceSoap");
    }
 
    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://localhost:8080/axis/
<http://localhost:8080/axis/> ", "TZCServiceSoap"));
        }
        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 ("TZCServiceSoap".equals(portName)) {
            setTZCServiceSoapEndpointAddress(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);
    }
 
}
 
Here's my wsdl, however not sure if the URLs are correct:
<?xml version="1.0" encoding="UTF-8" ?> 
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:definitions targetNamespace="http://localhost:8080/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/" xmlns:intf="http://localhost:8080/"
xmlns:tns1="http://localhost:8080/axis/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <!--   -->

- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:types>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <schema
elementFormDefault="qualified"
targetNamespace="http://localhost:8080/axis/"
xmlns="http://www.w3.org/2001/XMLSchema">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <element
name="GetTransactions">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<complexType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <sequence>
  <element name="query" type="xsd:string" /> 
  </sequence>
  </complexType>
  </element>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <element
name="GetTransactionsResponse">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<complexType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <sequence>
  <element name="GetTransactionsResult" type="xsd:string" /> 
  </sequence>
  </complexType>
  </element>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <element
name="AcknowledgeQueryResults">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<complexType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <sequence>
  <element name="request" type="xsd:string" /> 
  </sequence>
  </complexType>
  </element>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <element
name="AcknowledgeQueryResultsResponse">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<complexType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <sequence>
  <element name="AcknowledgeQueryResultsResult" type="xsd:string" /> 
  </sequence>
  </complexType>
  </element>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <element
name="UpdateTagList">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<complexType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <sequence>
  <element name="tagList" type="xsd:string" /> 
  </sequence>
  </complexType>
  </element>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <element
name="UpdateTagListResponse">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<complexType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <sequence>
  <element name="UpdateTagListResult" type="xsd:string" /> 
  </sequence>
  </complexType>
  </element>
  </schema>
  </wsdl:types>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:message name="UpdateTagListResponse">
  <wsdl:part element="tns1:UpdateTagListResponse" name="parameters" /> 
  </wsdl:message>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:message name="GetTransactionsRequest">
  <wsdl:part element="tns1:GetTransactions" name="parameters" /> 
  </wsdl:message>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:message name="AcknowledgeQueryResultsRequest">
  <wsdl:part element="tns1:AcknowledgeQueryResults" name="parameters" />

  </wsdl:message>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:message name="AcknowledgeQueryResultsResponse">
  <wsdl:part element="tns1:AcknowledgeQueryResultsResponse"
name="parameters" /> 
  </wsdl:message>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:message name="UpdateTagListRequest">
  <wsdl:part element="tns1:UpdateTagList" name="parameters" /> 
  </wsdl:message>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:message name="GetTransactionsResponse">
  <wsdl:part element="tns1:GetTransactionsResponse" name="parameters" />

  </wsdl:message>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:portType name="TZCServiceSoap">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:operation name="GetTransactions">
  <wsdl:input message="impl:GetTransactionsRequest"
name="GetTransactionsRequest" /> 
  <wsdl:output message="impl:GetTransactionsResponse"
name="GetTransactionsResponse" /> 
  </wsdl:operation>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:operation name="AcknowledgeQueryResults">
  <wsdl:input message="impl:AcknowledgeQueryResultsRequest"
name="AcknowledgeQueryResultsRequest" /> 
  <wsdl:output message="impl:AcknowledgeQueryResultsResponse"
name="AcknowledgeQueryResultsResponse" /> 
  </wsdl:operation>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:operation name="UpdateTagList">
  <wsdl:input message="impl:UpdateTagListRequest"
name="UpdateTagListRequest" /> 
  <wsdl:output message="impl:UpdateTagListResponse"
name="UpdateTagListResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:binding name="TZCServiceSoapSoapBinding"
type="impl:TZCServiceSoap">
  <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" /> 
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:operation name="GetTransactions">
  <wsdlsoap:operation
soapAction="http://localhost:8080/axis/GetTransactions" /> 
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:input name="GetTransactionsRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:output name="GetTransactionsResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:operation name="AcknowledgeQueryResults">
  <wsdlsoap:operation
soapAction="http://localhost:8080/axis/AcknowledgeQueryResults" /> 
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:input name="AcknowledgeQueryResultsRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:output name="AcknowledgeQueryResultsResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:operation name="UpdateTagList">
  <wsdlsoap:operation
soapAction="http://localhost:8080/axis/UpdateTagList" /> 
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:input name="UpdateTagListRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:output name="UpdateTagListResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>
<wsdl:service name="TZCService">
- <http://127.0.0.1:8080/axis/services/TZCServiceSoap?wsdl#>  <wsdl:port
binding="impl:TZCServiceSoapSoapBinding" name="TZCServiceSoap">
  <wsdlsoap:address
location="http://127.0.0.1:8080/axis/services/TZCServiceSoap" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
 
 
 
Jan

Mime
View raw message