-
1. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 14, 2007 2:48 PM (in response to meghanai_99)I could get wscompile to work by replacing <xsd:include> with <xsd:import>. But my xsd is under same namespace as wsdl's schema so include would have been correct choice here.
Is this a bug in wscomile?
Is this correct forum to ask this question?
Please let me know.
Thank you,
Meghana -
2. Re: wscompile fails to generate artifacts for included xsd
aguizar Feb 14, 2007 7:24 PM (in response to meghanai_99)Whenever possible use wstools instead of wscompile. We can fix the former, but not the latter.
Bugs/feature requests specific to jax-rpc tools are more appropriately addressed at the JBossWS or JWSDP forums. -
3. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 15, 2007 11:36 AM (in response to meghanai_99)How do I make sure that wstools runs? The ant scripts is picking wscompile on my machine and not running wstools. I have JBoss 4.0.5 so I was expecting it to run wstools.
-
4. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 15, 2007 12:27 PM (in response to meghanai_99)btw,
I could get the artifacts to generate when I replaced <xsd:include> with <xsd:import> However when I run ant deploy, I get following exceptions from JBoss. I wish it could give me more information about the operation it was trying to read. Just operation name would have been enough to make sure if there is something wrong with the wsdl or why is it different than the 'atm' sample that I could run successfully.
Here is the exception -
11:44:16,567 ERROR [MainDeployer] Could not create deployment: file:/D:/jboss-4.
0.5.GA/server/default/deploy/studio.war
java.lang.NullPointerException
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processOperationInput(WSDL11R
eader.java:474)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPortTypeOperations(WSD
L11Reader.java:460)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPortType(WSDL11Reader.
java:446)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processBinding(WSDL11Reader.j
ava:728)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPort(WSDL11Reader.java
:1071)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processPorts(WSDL11Reader.jav
a:1054)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processServices(WSDL11Reader.
java:1027)
at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reade
r.java:119)
at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitio
nsFactory.java:145)
I have posted the question about this exception on JBossWS but haven't heard back anything so I am kind of double posting it here for which I apologize but I need get this working soon.
Thank you,
Meghana -
5. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 22, 2007 11:57 AM (in response to meghanai_99)Any idea why I am getting the null pointer exception there?
-
6. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 23, 2007 6:45 PM (in response to meghanai_99)I started with 'hello' example this time and added my wsdl to that project. The hello.wsdl looks like this
hello.wsdl<?xml version="1.0" encoding="UTF-8"?> <definitions targetNamespace="http://jbpm.org/examples/hello" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://jbpm.org/examples/hello" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:evt="http://www.eclipse.org/alf/schema/EventBase/1"> <import namespace="http://www.eclipse.org/alf/schema/EventBase/1" location="resources/xml/ALFEventManagerSOAP.wsdl" /> <!-- characterizes the relationship between the greeter and its caller --> <plt:partnerLinkType name="Greeter-Caller"> <plt:role name="Greeter"> <plt:portType name="tns:ALFServiceFlow" /> </plt:role> <!-- the Caller does not provide services to the Greeter, this is why we omit the "Caller" role --> </plt:partnerLinkType> <!-- describes the interface presented to callers --> <portType name="ALFServiceFlow"> <operation name="eventNotice"> <input message="evt:EventNotice"/> </operation> </portType> </definitions>
Notice that I have portType 'ALFServiceFlow' defined in the wsdl. Originally I had it in my imported wsdl file
ALFEventManager.wsdl<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:evt="http://www.eclipse.org/alf/schema/EventBase/1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.eclipse.org/alf/schema/EventBase/1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ALFEventManager" targetNamespace="http://www.eclipse.org/alf/schema/EventBase/1"> <wsdl:documentation> WARNING: PRELIMINARY VERSION SUBJECT TO CHANGE Copyright Notice The material in this document is Copyright (c) Serena Software, Inc. and others, 2005, 2006 Terms and Conditions: The Eclipse Foundation makes available all content in this document ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content. If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If you did not receive any such license, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to the Content. </wsdl:documentation> <!-- ALF EventManager WSDL --> <wsdl:types> <xsd:schema xmlns="http://www.eclipse.org/alf/schema/EventBase/1" elementFormDefault="qualified" targetNamespace="http://www.eclipse.org/alf/schema/EventBase/1"> <xsd:import namespace="http://www.eclipse.org/alf/schema/EventBase/1" schemaLocation="ALFEventBase_1.xsd"/> </xsd:schema> </wsdl:types> <wsdl:message name="EventNotice"> <wsdl:part type="evt:ALFEventType" name="EventNotice"/> </wsdl:message> <wsdl:message name="EventNoticeResponse"> <wsdl:part type="evt:ALFEventResponseType" name="EventNoticeResponse"/> </wsdl:message> <wsdl:message name="EventNoticeWithReply"> <wsdl:part type="evt:ALFEventType" name="EventNoticeWithReply"/> </wsdl:message> <wsdl:message name="EventNoticeWithReplyResponse"> <wsdl:part type="evt:ALFEventWithReplyResponseType" name="EventNoticeWithReplyResponse"/> </wsdl:message> <wsdl:portType name="ALFEventManager"> <wsdl:operation name="EventNotice"> <wsdl:input message="evt:EventNotice"/> <wsdl:output message="evt:EventNoticeResponse"/> </wsdl:operation> <wsdl:operation name="EventNoticeWithReply"> <wsdl:input message="evt:EventNoticeWithReply"/> <wsdl:output message="evt:EventNoticeWithReplyResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:portType name="ALFServiceFlow"> <wsdl:operation name="eventNotice"> <wsdl:input message="evt:EventNotice"/> </wsdl:operation> </wsdl:portType> <wsdl:portType name="ALFServiceFlowWithReply"> <wsdl:operation name="EventNotice"> <wsdl:input message="evt:EventNotice"/> <wsdl:output message="evt:EventNoticeWithReplyResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ALFEventManagerSOAP" type="evt:ALFEventManager"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="EventNotice"> <soap:operation soapAction=""/> <wsdl:input> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="EventNoticeWithReply"> <soap:operation soapAction=""/> <wsdl:input> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="ALFServiceFlowSOAP" type="evt:ALFServiceFlow"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="eventNotice"> <soap:operation soapAction=""/> <wsdl:input> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:binding name="ALFServiceFlowWithReplySOAP" type="evt:ALFServiceFlowWithReply"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="EventNotice"> <soap:operation soapAction=""/> <wsdl:input> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://www.eclipse.org/alf/schema/EventBase/1"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <!-- Example services --> <wsdl:service name="ALFEventManager"> <wsdl:port binding="evt:ALFEventManagerSOAP" name="ALFEventManagerSOAP"> <soap:address location="http://localhost:8080/ALFEventManager/services/ALFEventManagerSOAP"/> </wsdl:port> </wsdl:service> <wsdl:service name="ALFServiceFlow"> <wsdl:port binding="evt:ALFServiceFlowSOAP" name="ALFServiceFlowSOAP"> <soap:address location="http://localhost:8080/ALFServiceFlow/services/ALFServiceFlowSOAP"/> </wsdl:port> </wsdl:service> <wsdl:service name="ALFServiceFlowWithReply"> <wsdl:port binding="evt:ALFServiceFlowWithReplySOAP" name="ALFServiceFlowWithReplySOAP"> <soap:address location="http://localhost:8080/ALFServiceFlow/services/ALFServiceFlowWithReplySOAP"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
Notice that this file has portType 'ALFServiceFlow' too. If I change the partnerLinkType to point to this ALFServiceFlow with the following namespace prefix change<plt:partnerLinkType name="Greeter-Caller"> <plt:role name="Greeter"> <plt:portType name="evt:ALFServiceFlow" /> </plt:role> <!-- the Caller does not provide services to the Greeter, this is why we omit the "Caller" role --> </plt:partnerLinkType>
I get above mentioned exception i.e NullPointerException in WSDL11Reader class.
My imported xsd file looks like this
ALFEventBase_1.xsd<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.eclipse.org/alf/schema/EventBase/1" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.eclipse.org/alf/schema/EventBase/1" version="1.0"> <xs:annotation> <xs:documentation> WARNING: PRELIMINARY VERSION SUBJECT TO CHANGE </xs:documentation> </xs:annotation> <xs:annotation> <xs:documentation> Copyright Notice The material in this document is Copyright (c) Serena Software, Inc. and others, 2005, 2006 Terms and Conditions: The Eclipse Foundation makes available all content in this document ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content. If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If you did not receive any such license, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to the Content. </xs:documentation> </xs:annotation> <!-- Begin EventBaseTypes --> <xs:complexType name="EventBaseType"> <xs:annotation> <xs:documentation> EventBaseType is a container for that portion of an ALF Event that is generally set by the Tool that raises the event. </xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="EventId" type="EventIdType"/> <xs:element name="Timestamp" type="TimestampType"/> <xs:element name="EventType" type="EventTypeType"/> <xs:element name="ObjectType" type="ObjectTypeType"/> <xs:element name="ObjectId" type="ObjectIdType"/> <xs:element name="Source" type="SourceType"/> <xs:element name="User" type="CredentialsType"/> <xs:element name="EventControl" type="EmBaseType"/> <xs:element minOccurs="0" name="BaseExtension" type="BaseExtensionType"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:complexType name="EmBaseType"> <xs:annotation> <xs:documentation> EventControlType is a container for that portion of an ALF Event that is generally set by the ALF EventManager. In some cases, ALF compliant tools may set some fields, in particular when the event is a result of an ALF service call to that tool from a ServiceFlow. </xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="EmEventId" type="xs:string"/> <xs:element name="EmTimestamp" type="TimestampType"/> <xs:element name="PredecedingEmEventId" type="EventIdType"/> <xs:element name="ApplicationName" type="ApplicationNameType"/> <xs:element name="EventMatchName" type="EventMatchNameType"/> <xs:element name="ServiceFlowName" type="ServiceFlowNameType"/> <xs:element name="ServiceFlowId" type="ServiceFlowIdType"/> <xs:element name="Callback" type="xs:boolean"/> <xs:element name="Environment" type="EnvironmentType"/> <xs:element name="EmUser" type="CredentialsType"/> <xs:element minOccurs="0" name="EmExtension" type="EmExtensionType"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:simpleType name="EventIdType"> <xs:annotation> <xs:documentation> A UUID that uniquely identifies the Event instance. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:maxLength value="36"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="ServiceFlowIdType"> <xs:annotation> <xs:documentation> A UUID that uniquely identifies the ServiceFlow instance. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:maxLength value="36"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="TimestampType"> <xs:annotation> <xs:documentation> The date and timestamp when the EventManager received the Event. This element may be left empty by the event emitter, in which case, the Event Manager will supply a value. </xs:documentation> </xs:annotation> <xs:restriction base="xs:dateTime"/> </xs:simpleType> <xs:simpleType name="EventTypeType"> <xs:annotation> <xs:documentation> A string indicating the type of event. EventType designates the verb. That is what action happened to the Objects that triggered the event. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <!-- ============= Object that triggered the event ============= --> <xs:simpleType name="ObjectIdType"> <xs:annotation> <xs:documentation> An ObjectId identifies the entity or relationship that changed within a tool. The identifier must be unique for a particular instance of the source tool. The format of this element will not be standardized by ALF. The primary purpose is to allow subsequent ServiceFlows to uniquely identify (and perhaps access) the object that triggered the event. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="ObjectTypeType"> <xs:annotation> <xs:documentation> The type of entity involved. Note that the word entity is taken in its broadest sense, referring to whatever artifact a tool was operating on. For example, for a data modeling tool, an E-R relationship is a type of entity (i.e., and ObjectType) to ALF. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <!-- ============= The source (i.e, tool or product) that emitted the event ============= --> <xs:complexType name="SourceType"> <xs:annotation> <xs:documentation> A Source element is a container type that describes the source of the event. ProductCallbackURI is optional for tools that don't provide a listener to accept the callback from a tool or serviceflow at a later time. </xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="Product" type="ProductType"/> <xs:element name="ProductVersion" type="ProductVersionType"/> <xs:element name="ProductInstance" type="ProductInstanceType"/> <xs:element maxOccurs="1" minOccurs="0" name="ProductCallbackURI" type="ProductCallbackURIType"/> </xs:sequence> </xs:complexType> <xs:simpleType name="ProductType"> <xs:annotation> <xs:documentation> A descriptive name for the tool (i.e., program) that emitted the Event. Note that this is a datatype for a Product element. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="ProductCallbackURIType"> <xs:annotation> <xs:documentation> The web service endpoint for tools that support callbacks from ServiceFlows for additional information. The element content is optional for transient tools that may not be running at a later time, and so cannot accept a callback. Constantly running (server) tools that support callbacks should supply a URI. </xs:documentation> </xs:annotation> <xs:restriction base="xs:anyURI"/> </xs:simpleType> <xs:simpleType name="ProductInstanceType"> <xs:annotation> <xs:documentation> A unique string identifying the instance of the tool. This is useful when there may be multiple instances of a product working within an instance of ALF. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="ProductVersionType"> <xs:annotation> <xs:documentation> The release version of the product, such as 5.06 </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <!-- ====== User information identifying the security context of the request ======= --> <xs:complexType name="CredentialsType"> <xs:annotation> <xs:documentation> A structure to hold security authentication-relevant data. If present the data within may be encrypted. </xs:documentation> </xs:annotation> <xs:sequence> <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:simpleType name="ApplicationNameType"> <xs:annotation> <xs:documentation> The name of the ALF application to which this event belongs. Depending on the emitting tool, events may or may not be associated with an ALF application. If the emitting tool has the information available then it can provide the ALF ApplicationName as an additional information to distinguish the event. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="EventMatchNameType"> <xs:annotation> <xs:documentation> The name of the event match within the ALF Application that matches this event. This fields is set by the Event Manager when it dispatches the event. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="ServiceFlowNameType"> <xs:annotation> <xs:documentation> The name of the service flow withing the event match that matches this event. This field is set by the Event Manager when it dispatches the event. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="EnvironmentType"> <xs:annotation> <xs:documentation> The name of the environment in which this event is being raised. This element will be set by the ALF Event manager from its installation configuration. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="ALFSchemaVersionType"> <xs:restriction base="xs:string"> <xs:enumeration value="1.0"/> </xs:restriction> </xs:simpleType> <xs:complexType name="BaseExtensionType"> <xs:annotation> <xs:documentation> Place holder type for future extensions of BaseExtensionType </xs:documentation> </xs:annotation> <xs:sequence> <xs:any maxOccurs="unbounded" namespace="targetnamespace"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:complexType name="EmExtensionType"> <xs:annotation> <xs:documentation> Place holder type for future extensions of EmBaseType </xs:documentation> </xs:annotation> <xs:sequence> <xs:any maxOccurs="unbounded" namespace="targetnamespace"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:complexType name="DetailExtensionType"> <xs:annotation> <xs:documentation> Place holder type for vocabulary based Event payload "details" </xs:documentation> </xs:annotation> <xs:sequence> <xs:any maxOccurs="unbounded" namespace="##other" processContents="lax"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <xs:complexType name="CustomExtensionType"> <xs:annotation> <xs:documentation> Place holder type for custom Event payload "extensions" </xs:documentation> </xs:annotation> <xs:sequence> <xs:any maxOccurs="unbounded" namespace="##other" processContents="lax"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> <!-- End EventBaseTypes --> <!-- BEGIN ALFEvent --> <xs:complexType name="ALFEventType"> <xs:sequence> <xs:element name="Base" type="EventBaseType"/> <xs:element minOccurs="0" name="Detail" type="DetailExtensionType"/> <xs:element minOccurs="0" name="Extension" type="CustomExtensionType"/> <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax"/> </xs:sequence> <xs:attribute default="1.0" name="version" type="ALFSchemaVersionType"/> </xs:complexType> <xs:complexType name="ALFEventResponseType"> <xs:sequence> <xs:any minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="ALFEventWithReplyResponseType"> <xs:sequence> <xs:any minOccurs="0"/> </xs:sequence> </xs:complexType> <!-- END ALFEvent --> <!-- Event Notice --> <!-- Element declaration for creating documents --> <xs:element name="EventNotice" type="ALFEventType"/> </xs:schema>
Can anyone help me figure out what the problem is?
Thank you,
Meghana -
7. Re: wscompile fails to generate artifacts for included xsd
aguizar Feb 24, 2007 5:44 PM (in response to meghanai_99)Looks like there is a bug in JBossWS. I will investigate it as soon as I have some spare time. In the meantime, please install and test the latest JBossWS release. You can find the distribution and installation instructions in http://labs.jboss.com/portal/jbossws/.
-
8. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 26, 2007 11:34 AM (in response to meghanai_99)Thank you for the reply.
Should I try new JBoss 5.0.0 Beta1? Looks like it has integrated support for JBossWS. The reason I ask is because I don't know if the latest version of JBossWS is compatible with JBoss 4.0.5GA. Please let me know.
Thank you,
Meghana -
9. Re: wscompile fails to generate artifacts for included xsd
aguizar Feb 27, 2007 12:44 AM (in response to meghanai_99)Even tough JBossWS 1.0.4 is compatible with both AS branches (4.0.x and 5.0.x), please stick to AS 4.0.5.GA for now. BPEL was not tested with AS 5.0.0.x.
-
10. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 27, 2007 2:13 PM (in response to meghanai_99)I tried latest release of JBossWS1.0.4GA on JBossAS 4.0.5. I followed these installation instructions -
In order to install JBossWS the following steps are necessary:
1.) Copy lib/jbossws-client.jar to $JBOSS_HOME/client/
2.) Unzip lib/jbossws.sar to $JBOSS_HOME/server/default/deploy/
3.) Replacing jboss-xml-binding.jar
You need to manually replace the jboss-xml-binding.jar in the $JBOSS_HOME/client and $JBOSS_HOME/lib directories.
The compatible release can be found here: http://repository.jboss.com/jboss/jbossxb/1.0.0.CR7
Then I ran 'ant generate artifacts' and got new exception which looked worse. It seems it cannot find my wsdl file now.
call-wstools:
[wstools] java.lang.NullPointerException
[wstools] at java.io.File.(File.java:194)
[wstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGenera
tion(ToolsHelper.java:282)
[wstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
[wstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
[wstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
[wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
The BPEL and WSDL files I used are -
hello.wsdl<?xml version="1.0" encoding="UTF-8"?> <definitions targetNamespace="http://jbpm.org/examples/hello" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://jbpm.org/examples/hello" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:evt="http://www.eclipse.org/alf/schema/EventBase/1"> <import namespace="http://www.eclipse.org/alf/schema/EventBase/1" location="resources/xml/ALFEventManagerSOAP.wsdl" /> <!-- characterizes the relationship between the greeter and its caller --> <plt:partnerLinkType name="Greeter-Caller"> <plt:role name="Greeter"> <plt:portType name="tns:ALFServiceFlow" /> </plt:role> <!-- the Caller does not provide services to the Greeter, this is why we omit the "Caller" role --> </plt:partnerLinkType> <!-- describes the interface presented to callers --> <portType name="ALFServiceFlow"> <operation name="eventNotice"> <input message="evt:EventNotice"/> </operation> </portType> <!--<portType name="ALFServiceFlow"> <operation name="TEMPEventNotice"> <input message="evt:EventNotice"/> </operation> </portType>--> </definitions>
hello.bpel<?xml version="1.0" encoding="UTF-8"?> <process name="HelloWorld" targetNamespace="http://jbpm.org/examples/hello" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:tns="http://jbpm.org/examples/hello" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:evt="http://www.eclipse.org/alf/schema/EventBase/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/ http://schemas.xmlsoap.org/ws/2003/03/business-process/"> <partnerLinks> <!-- establishes the relationship with the caller agent --> <partnerLink name="caller2" partnerLinkType="tns:Greeter-Caller" myRole="Greeter" /> </partnerLinks> <variables> <!-- holds the incoming message --> <variable name="request" messageType="evt:EventNotice" /> </variables> <sequence> <!-- receive the name of a person --> <receive operation="eventNotice" partnerLink="caller2" portType="tns:ALFServiceFlow" variable="request" createInstance="yes" /> <assign name="Calculate"> <copy> <from expression="concat(bpel:getVariableData('request', 'EventNotice', '/EventNotice/evt:Base/evt:EventType'),bpel:getVariableData('request', 'EventNotice', '/EventNotice/evt:Base/evt:ObjectType'))" /> <to part="EventNotice" query="/EventNotice/evt:Base/evt:ObjectType" variable="request" /> </copy> </assign> <!-- compose a greeting phrase --> <!-- <assign> <copy> <from expression="concat('Hello, ', bpel:getVariableData('request', 'name'), '!')" /> <to variable="response" part="greeting" /> </copy> </assign> --> <!-- reply with the greeting --> <!-- <reply operation="sayHello" partnerLink="caller2" portType="tns:Greeter" variable="response" /> --> </sequence> </process>
I get this same exception for both 'evt:ALFServiceFlow' and 'tns:ALFServiceFlow' portTypes
Meghana -
11. Re: wscompile fails to generate artifacts for included xsd
aguizar Feb 27, 2007 5:37 PM (in response to meghanai_99)If wstools fails (as in your case) please switch to wscompile and see what happens.
-
12. Re: wscompile fails to generate artifacts for included xsd
meghanai_99 Feb 27, 2007 5:52 PM (in response to meghanai_99)I could get wscompile to work on the client side by editing the build.properties file in the <jbpm-bpel-home>\config folder. Only thing I had to change war replacing <xsd:include> with <xsd:import>.
However on 'ant deploy' JBoss's bundled wstools takes over and I get the exception I have posted at the start of the thread. How to I make JBoss to switch over to wscompile?
Note that the NullPointerException in WSDL11Reader was with bundled JBossWS. I have yet to test it with latest release of JBossWS which I am going to do now but I do not have high hopes. -
13. Re: wscompile fails to generate artifacts for included xsd
aguizar Feb 27, 2007 7:46 PM (in response to meghanai_99)I'll investigate the NPE. For JBossWS 1.0.3.SP1, the stack trace points here:
private void processOperationInput(Definition srcWsdl, Operation srcOperation, WSDLInterfaceOperation destOperation, PortType srcPortType) { Input srcInput = srcOperation.getInput(); if (srcInput != null) { Message srcMessage = srcInput.getMessage(); log.trace("processOperationInput: " + srcMessage.getQName()); QName wsaAction = (QName)srcInput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION); if (wsaAction != null) destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN, wsaAction.getLocalPart())); ...
For some reason an operation's input message is being set to null, normally when a message is not found you get an error message.
I noticed you have a duplicate port type definition in hello.wsdl, you don't need that as long as you import another WSDL document that defines it. This probably won't fix the problem but is a step forward.
I'd appreciate if you zipped your project and sent it to me so that I can investigate more quickly. -
14. Re: wscompile fails to generate artifacts for included xsd
frostp Feb 28, 2007 1:56 PM (in response to meghanai_99)Hi,
meghanai_99, I have the same issue as you do, however I am using a schema that's defined inside the WSDL. (Ironically I'm now thinking about using an XSD to define my custom types!)
My project sounds pretty much like what you are trying to achieve as well (hello world + WS call)
I have tried to build using both wstools and wscompile and basically end up with problems.
I'll watch this thread with interest to see what happens and share my (limited) knowledge/experiences.