Hey all, having a problem and I'm stumped.
I use PHP NuSOAP to create a Soap Server. I have
one function that is causing a
compilation error whenever WSDL2JAVA is run
with Apache Axis 1.1. I get the error when I run it locally with java, and when we try to use the web services via Cold
Fusion MX.
I successfully ran these services with a regular Apache Axis WS client,
Glue, and the PHP NuSOAP WS Client.
The line causing the problem is ok in every other
one of my methods. But the error only
occurs in one specific method.
I use Axis 1.1 on both my machine and the Cold
Fusion server. My machine has Java 1.3.1 and the MX server is running
1.4.2.
I can get the binding stub to compile but I have
to import the "org.apache.axis" class and then remove the
"org.apache.axis" from
(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS). I'd rather get this to
work with the WSDL2JAVA call without having to
manipulate the code.
Is this Axis, or is this a WSDL problem?
Thanks in advance
-- Adam Pyatt
The errors are below:
WorkflowServices_pkg/WorkflowServicesBindingStub.java
[628:1] cannot
resolve symbol
symbol : variable apache
location: class java.lang.String
_call.setSOAPVersion
(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
WorkflowServicesBindingStub.java [643:1] cannot resolve symbol
symbol : variable apache
location: class java.lang.String
return (WorkflowServices_pkg.WorkflowRoute[])
org.apache.axis.utils.JavaUtils.convert(_resp,
WorkflowServices_pkg.WorkflowRoute[].class);
^
Here is the method causing my agony:
public WorkflowServices_pkg.WorkflowRoute[]
getWorkflowRouteInformation(java.lang.String formType, java.lang.String
formSubType, java.lang.String org, java.lang.String dept, java.lang.String
subLevel) throws java.rmi.RemoteException {
if (super.cachedEndpoint ==
null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call
_call = createCall();
_call.setOperation(_operations[7]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("getWorkflowRouteInformation");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new
javax.xml.namespace.QName("urn:WorkflowServices",
"getWorkflowRouteInformation"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp =
_call.invoke(new java.lang.Object[] {formType, formSubType, org, dept,
subLevel});
if (_resp instanceof
java.rmi.RemoteException) {
throw
(java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try
{
return (WorkflowServices_pkg.WorkflowRoute[]) _resp;
}
catch (java.lang.Exception _exception) {
return
(WorkflowServices_pkg.WorkflowRoute[])
org.apache.axis.utils.JavaUtils.convert(_resp,
WorkflowServices_pkg.WorkflowRoute[].class);
}
}
}
The wsdl is lengthy, so here are the relevant parts:
> <message
name="getWorkflowRouteInformationRequest">
> <part name="formType"
type="xsd:string"/>
> <part name="formSubType"
type="xsd:string"/>
> <part name="org"
type="xsd:string"/>
> <part name="dept"
type="xsd:string"/>
> <part name="subLevel"
type="xsd:string"/>
> </message>
> <message
name="getWorkflowRouteInformationResponse">
> <part name="return"
type="tns:WorkflowRoutes"/>
> </message>
>
> <xsd:complexType
name="WorkflowRoute">
> <xsd:all>
> <xsd:element name="EMPLID"
type="xsd:string"/>
> <xsd:element name="NAME"
type="xsd:string"/>
> <xsd:element
name="UI_WKFLW_APPRV_FLG" type="xsd:string"/>
> <xsd:element name="WORKGROUP"
type="xsd:string"/>
> <xsd:element
name="UI_WKFLW_APPRV_FLG_DISPLAY" type="xsd:string"/>
> </xsd:all>
> </xsd:complexType>
>
> <xsd:complexType
name="WorkflowRoutes">
> <xsd:complexContent>
> <xsd:restriction
base="SOAP-ENC:Array">
> <xsd:attribute
ref="SOAP-ENC:arrayType"
>
wsdl:arrayType="tns:WorkflowRoute[]"/>
> </xsd:restriction>
> </xsd:complexContent>
> </xsd:complexType>
>
> <operation
name="getWorkflowRouteInformation">
> <soap:operation
soapAction="getWorkflowRouteInformation"
> style="rpc"/>
> <input>
> <soap:body use="encoded"
namespace="urn:WorkflowServices"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </input>
> <output>
> <soap:body use="encoded"
namespace="urn:WorkflowServices"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </output>
> </operation>