Thanks. It works with GFv2-b39
Vijay Ramachandran wrote:
> Can you please try with GFv2-b37 or later ?
>
> This was a bug in 109 which was fixed recently.
>
> Here is the bug :
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1534
>
> Vijay
>
> Mark Hansen wrote:
>
>> I'm using v2 b33. Getting an error when deploying a
>> @WebServiceProvider. Error is being caused by the WSDL referenced by
>> the wsdlLocation. The WSDL uses <xs:include ../> elements to integrated
>> with XSDs that have been publised on the net. So schemaLocations are of
>> the form "http://soabook.com/ ...". But, GlassFish seems to be
>> interpreting the schemaLocations as being relative to the wsdlLocation
>> on the local machine; thereby generating FileNotFoundException.
>>
>> This same example deployed under v1 (the first release of the Java EE
>> SDK).
>>
>> Below are code snippets. Any help would be appreciated.
>>
>> -- Mark
>>
>>
>>
>> @WebServiceProvider(serviceName = "RequestOrderService",
>> portName="RequestOrderPort",
>> targetNamespace = "http://www.example.com/req",
>> wsdlLocation="WEB-INF/wsdl/RequestOrder.wsdl")
>> @ServiceMode(Service.Mode.PAYLOAD)
>> public class RequestOrderEndpoint implements Provider<Source> {
>>
>>
>> WSDL
>> ========
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions targetNamespace="http://www.example.com/req"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> xmlns:oms="http://www.example.com/oms"
>> xmlns:req="http://www.example.com/req"
>> xmlns:faults="http://www.example.com/faults">
>> <wsdl:types>
>> <xs:schema targetNamespace="http://www.example.com/oms">
>> <xs:include
>> schemaLocation="http://soabook.com/example/oms/orders.xsd"/>
>> </xs:schema>
>> <xs:schema targetNamespace="http://www.example.com/faults">
>> <xs:include
>> schemaLocation="http://soabook.com/example/faults/faults.xsd"
>> />
>> </xs:schema>
>> <xs:schema elementFormDefault="qualified"
>> targetNamespace="http://www.example.com/req">
>> <xs:import namespace="http://www.example.com/oms"/>
>> <xs:element name="requestOrder">
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element name="CUST_NO">
>> <xs:simpleType>
>> <xs:restriction base="xs:string">
>> <xs:maxLength value="10"/>
>> </xs:restriction>
>> </xs:simpleType>
>> </xs:element>
>> <xs:element name="PURCH_ORD_NO" minOccurs="0">
>> <xs:simpleType>
>> <xs:restriction base="xs:string">
>> <xs:maxLength value="35"/>
>> </xs:restriction>
>> </xs:simpleType>
>> </xs:element>
>> <xs:element name="ccard" type="oms:BUSOBJ_CCARD"
>> minOccurs="0"/>
>> <xs:element name="item" type="oms:BUSOBJ_ITEM"
>> maxOccurs="unbounded"/>
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>> <xs:element name="requestOrderResponse">
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element ref="oms:Order"/>
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>> </xs:schema>
>> </wsdl:types>
>> <wsdl:message name="request">
>> <wsdl:part name="parameters" element="req:requestOrder"/>
>> </wsdl:message>
>> <wsdl:message name="response">
>> <wsdl:part name="parameters" element="req:requestOrderResponse"/>
>> </wsdl:message>
>> <wsdl:message name="inputFault">
>> <wsdl:part name="parameters"
>> element="faults:inputMessageValidationFault"/>
>> </wsdl:message>
>> <wsdl:portType name="RequestOrderPort">
>> <wsdl:operation name="requestOrder">
>> <wsdl:input message="req:request"/>
>> <wsdl:output message="req:response"/>
>> <wsdl:fault name="requestOrderInputFault"
>> message="req:inputFault"/>
>> </wsdl:operation>
>> </wsdl:portType>
>> <wsdl:binding name="RequestOrderSOAPBinding"
>> type="req:RequestOrderPort">
>> <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>> <wsdl:operation name="requestOrder">
>> <wsdl:input>
>> <soap:body use="literal"/>
>> </wsdl:input>
>> <wsdl:output>
>> <soap:body use="literal"/>
>> </wsdl:output>
>> <wsdl:fault name="requestOrderInputFault">
>> <soap:fault name="requestOrderInputFault"/>
>> </wsdl:fault>
>> </wsdl:operation>
>> </wsdl:binding>
>> <wsdl:service name="RequestOrderService">
>> <wsdl:port name="RequestOrderPort"
>> binding="req:RequestOrderSOAPBinding">
>> <soap:address location="not yet determined"/>
>> </wsdl:port>
>> </wsdl:service>
>> </wsdl:definitions>
>>
>>
>> SERVER.LOG
>> ==================
>> [#|2007-03-14T22:30:23.974-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=13;_ThreadName=httpWorkerThread-4848-0;_RequestID=2ed3c657-a410-4246-a045-64a9a27b2511;|WebModule[/chap07-endpoint-provider-endpoint-1.0]PWC1396:
>>
>> Servlet /chap07-endpoint-provider-endpoint-1.0 threw load() exception
>> javax.servlet.ServletException
>> at
>> com.sun.enterprise.webservice.JAXWSServlet.doInit(JAXWSServlet.java:237)
>> at
>> com.sun.enterprise.webservice.JAXWSServlet.init(JAXWSServlet.java:99)
>> at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1165)
>>
>>
>> <snip/>
>>
>> Caused by: com.sun.xml.ws.server.ServerRtException: exception during
>> WSDL parsing:
>> file:/C:/bin/glassfish-v2-b33/domains/domain1/applications/j2ee-modules/chap07-endpoint-provider-endpoint-1.0/WEB-INF/wsdl/http:/soabook.com/example/oms/orders.xsd
>>
>> at
>> com.sun.xml.ws.server.SDDocumentImpl.create(SDDocumentImpl.java:149)
>> at
>> com.sun.xml.ws.server.EndpointFactory.categoriseMetadata(EndpointFactory.java:419)
>>
>> at
>> com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:146)
>>
>> at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:420)
>> at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:463)
>> at
>> com.sun.enterprise.webservice.JAXWSServlet.registerEndpoint(JAXWSServlet.java:331)
>>
>> at
>> com.sun.enterprise.webservice.JAXWSServlet.doInit(JAXWSServlet.java:230)
>> ... 75 more
>> Caused by: java.io.FileNotFoundException:
>> C:\bin\glassfish-v2-b33\domains\domain1\applications\j2ee-modules\chap07-endpoint-provider-endpoint-1.0\WEB-INF\wsdl\http:\soabook.com\example\oms\orders.xsd
>>
>> (The filename, directory name, or volume label syntax is incorrect)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>