You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by mark pope <th...@yahoo.com> on 2003/05/21 22:55:52 UTC
WSDL2Java code generation error
I have defined a message as an exception:
<wsdl:message name="OutageRequestWebServiceException">
<wsdl:part name="overlaps" type="sns:OverlapOutages"/>
<wsdl:part name="code" type="xsd:int"/>
<wsdl:part name="message" type="xsd:string"/>
</wsdl:message>
and assigned it as the fault for operations and binding. Code generation
produces the following interface method:
public java.lang.String uploadOutageRequestXML(java.lang.String requestXML)
throws java.rmi.RemoteException, com.caiso.slic.schemas.slic.v3.OverlapOutages;
If I remove the message part "overlaps" the generated code is:
public java.lang.String uploadOutageRequestXML(java.lang.String requestXML)
throws java.rmi.RemoteException,
com.caiso.www.webservices.slic.OutageRequestWebService.OutageRequestWebServiceException;
I want to define the message part and get the latter interface method. Can
anyone help? Is this a known bug? I can provide the files if necessary.
For reference sns:OverlapOutages is defined as:
<xsd:element name="OverlapOutage" nillable="true"
type="sns:OverlapOutage"/>
<xsd:complexType name="OverlapOutage">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="outage_id"
type="bns:IntegerAtt"/>
<xsd:element maxOccurs="1" minOccurs="0" name="outage_start_dts"
type="bns:DateTimeAtt"/>
<xsd:element maxOccurs="1" minOccurs="0" name="outage_end_dts"
type="bns:DateTimeAtt"/>
<xsd:element maxOccurs="1" minOccurs="0" name="gen_curtailed_mw"
type="bns:DoubleAtt"/>
<xsd:element maxOccurs="1" minOccurs="0" name="outage_overlap"
type="sns:ArrayOf_OverlapRelationship"/>
<xsd:element maxOccurs="1" minOccurs="0" name="extended_attributes"
type="bns:ExtendedAttributes"/>
</xsd:sequence>
</xsd:complexType>
=====
Regards,
Mark Pope
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Does java2wsdl currently support attachments?
Posted by Colin Sampaleanu <co...@exis.com>.
After looking through the mailing list archives, I am unclear if
java2wsdl should support mappaing attachments (referred to as type
DataHandler in the java source) to attachments (DIME or SOAP). There
was a message from Russell Butek in August last year saying it was
coming a week later. However later messages would appear to indicate
it's still not there. When I do currently run java2wsdl on a file
containing the following method
String test2(DataHandler dh);
I get the exception listed below. Can anybody shed some light on this:
-----
[axis-java2wsdl] - The class javax.activation.DataHandler is defined in
a java o
r javax package and cannot be converted into an xml schema type. An xml
schema
anyType will be used to define this class in the wsdl file.
[axis-java2wsdl] WSDLException: faultCode=OTHER_ERROR: Can't find prefix
for 'ht
tp://activation.javax'. Namespace prefixes must be set on the Definition
object
using the addNamespace(...) method.:
[axis-java2wsdl] at
com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown Sour
ce)
[axis-java2wsdl] at
com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unkn
own Source)
[axis-java2wsdl] at
com.ibm.wsdl.util.xml.DOMUtils.printQualifiedAttribut
e(Unknown Source)
[axis-java2wsdl] at
com.ibm.wsdl.xml.WSDLWriterImpl.printParts(Unknown So
urce)
[axis-java2wsdl] at
com.ibm.wsdl.xml.WSDLWriterImpl.printMessages(Unknown
Source)
[axis-java2wsdl] at
com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unkno
wn Source)
[axis-java2wsdl] at
com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Sou
rce)
[axis-java2wsdl] at
com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown S
ource)
[axis-java2wsdl] at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.ja
va:267)
[axis-java2wsdl] at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.ja
va:334)
[axis-java2wsdl] at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execu
te(Java2WsdlAntTask.java:252)
[axis-java2wsdl] at
org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:193)
[axis-java2wsdl] at org.apache.tools.ant.Task.perform(Task.java:341)
[axis-java2wsdl] at
org.apache.tools.ant.Target.execute(Target.java:309)
[axis-java2wsdl] at
org.apache.tools.ant.Target.performTasks(Target.java:
336)
[axis-java2wsdl] at
org.apache.tools.ant.Project.executeTarget(Project.ja
va:1339)
[axis-java2wsdl] at
org.apache.tools.ant.Project.executeTargets(Project.j
ava:1255)
[axis-java2wsdl] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[axis-java2wsdl] at org.apache.tools.ant.Main.start(Main.java:196)
[axis-java2wsdl] at org.apache.tools.ant.Main.main(Main.java:235)