Announcement Announcement Module
Collapse
No announcement yet.
Handling multiple xsd's in wsdl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling multiple xsd's in wsdl

    How do you specify to expose the dependant multiple xsd's ? Read here on the forums, that there was Jira open(http://opensource.atlassian.com/proj...browse/SWS-162) to handle multiple xsd's in the wsdl.
    Am getting an exception that the foll. property is not available, when I specify the foll. property in the spring servlet. Where can I get the fix for this?

    <property name="followIncludeImport" value="true"/>

    Appreciate your help.

    Thanks
    Sunil

  • #2
    That was fixed for Spring-WS 1.0.2, which hasn't been released yet.

    If you want to use it now you can pull down one of the nightly snapshots...
    http://static.springframework.org/sp...snapshots.html

    Comment


    • #3
      Ray.

      Any idea when is the Spring-WS 1.0.2 release date ?

      Thanks
      Sunil

      Comment


      • #4
        Only Arjen can answer that

        I'm not one of the developers anyway :P

        Comment


        • #5
          ok. I dont use, Maven for build. Am using Ant build. How do I download the necessary nightly snapshot for this fix ?

          Thanks
          Sunil

          Comment


          • #6
            Hopefully, I will be able to release 1.0.2 this Friday. However, some new issues have been logged recently (which is a good thing ), which I'd like to fix for 1.0.2 as well.

            Comment


            • #7
              Thanks Arjen. In the meantime, I wish to test out this. Where can I get the jar file or the class which has the fix for this issue ? Pls. let me know.

              Thanks
              Sunil

              Comment


              • #8
                See http://static.springframework.org/sp...snapshots.html

                Comment


                • #9
                  I downloaded the spring-ws 1.0.2, and am trying to test the webservice using the soapUI client. Am specifying add wsdl from url, and I get the following error:
                  ERROR:Error importing wsdl: org.apache.xmlbeans.XmlException: error: </body> does not close tag <HR>.

                  Have modified the MTOM sample to import another xsd. Both my xsd's are in the WEB-INF directory. Believe this was fixed in 1.0.2. What am I doing wrong?

                  Any help higly appreciated. As we dont want to distribute the wsdl manually.

                  Here's my spring servlet xml:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

                  <bean id="imageRepository" class="org.spring.ws.samples.mtom.service.StubImag eRepository"/>

                  <bean class="org.spring.ws.samples.mtom.ws.ImageReposito ryEndpoint">
                  <constructor-arg ref="imageRepository"/>
                  </bean>

                  <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping"/>

                  <bean class="org.springframework.ws.server.endpoint.adap ter.MarshallingMethodEndpointAdapter">
                  <constructor-arg ref="marshaller"/>
                  </bean>

                  <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
                  <property name="contextPath" value="org.spring.ws.jaxb.mtom.schema"/>
                  <property name="mtomEnabled" value="true"/>
                  </bean>

                  <bean id="mtom" class="org.springframework.ws.wsdl.wsdl11.DynamicW sdl11Definition">
                  <property name="builder">
                  <bean class="org.springframework.ws.wsdl.wsdl11.builder. XsdBasedSoap11Wsdl4jDefinitionBuilder">
                  <property name="schema" value="/WEB-INF/schema.xsd"/>
                  <property name="followIncludeImport" value="true"/>
                  <property name="portTypeName" value="ImageRepository"/>
                  <property name="locationUri" value="http://localhost:8080/mtom/"/>
                  </bean>
                  </property>
                  </bean>

                  </beans>

                  This is my schema.xsd

                  <?xml version="1.0"?>
                  <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.springframework.org/ws/samples/mtom/schema"
                  xmlns:tns="http://www.springframework.org/ws/samples/mtom/schema"
                  xmlns:comm="http://www.springframework.org/ws/samples/common"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xmime="http://www.w3.org/2005/05/xmlmime" elementFormDefault="qualified">

                  <xsd:import namespace="http://www.springframework.org/ws/samples/common"
                  schemaLocation="common.xsd"/>

                  <xsd:element name="StoreImageRequest" type="tns:Image"/>

                  <xsd:element name="LoadImageRequest" type="xsd:string"/>

                  <xsd:element name="LoadImageResponse" type="tns:Image"/>

                  <xsd:complexType name="Image">
                  <xsd:sequence>
                  <xsd:element name="request" type="comm:RequestType"/>
                  <xsd:element name="name" type="xsd:string"/>
                  <xsd:element name="image" type="base64Binary" xmime:expectedContentTypes="image/png"/>
                  </xsd:sequence>
                  </xsd:complexType>

                  </xsd:schema>

                  This is the common.xsd

                  <?xml version="1.0"?>
                  <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.springframework.org/ws/samples/common"
                  xmlns:tns="http://www.springframework.org/ws/samples/common"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xmime="http://www.w3.org/2005/05/xmlmime" elementFormDefault="qualified">

                  <xsd:complexType name="RequestType">
                  <xsd:sequence>
                  <xsd:element name="username" type="xsd:string"/>
                  <xsd:element name="client" type="xsd:string"/>
                  </xsd:sequence>
                  </xsd:complexType>

                  </xsd:schema>


                  Thanks
                  Sunil

                  Comment


                  • #10
                    "</body> does not close tag <HR>"

                    That to me looks like your webserver returned you an html page. More than like a 404 error page or maybe a 500 internal server error page.

                    Comment


                    • #11
                      The http log on the soapUI gives me the foll. error:

                      Thu Nov 08 16:05:01 EST 2007EBUG:<< "HTTP/1.1 405 Method Not Allowed"
                      The specified HTTP method is not allowed for the requested resource

                      But if copy the wsdl & xsd manually to a local folder, and Add wsdl from file in the soapUI client, am successfully able to load.

                      I think this is related to the Issue SWS-162.

                      Thanks
                      Sunil

                      Comment


                      • #12
                        Anyone else facing this problem ? Pls. help.

                        Thanks
                        Sunil

                        Comment


                        • #13
                          If you hit the wsdl url manually from your browser what do you get?

                          Comment


                          • #14
                            Ray.

                            This is the response I get when I hit the wsdl url manually:

                            <?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:schema="http://www.springframework.org/ws/samples/mtom/schema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.springframework.org/ws/samples/mtom/schema">
                            <wsdl:types>
                            <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:comm="http://www.springframework.org/ws/samples/common" xmlns:tns="http://www.springframework.org/ws/samples/mtom/schema" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.springframework.org/ws/samples/mtom/schema">

                            <xsd:import namespace="http://www.springframework.org/ws/samples/common" schemaLocation="common.xsd"/>

                            <xsd:element name="StoreImageRequest" type="tns:Image"/>

                            <xsd:element name="LoadImageRequest" type="xsd:string"/>

                            <xsd:element name="LoadImageResponse" type="tns:Image"/>

                            <xsd:complexType name="Image">
                            <xsd:sequence>
                            <xsd:element name="request" type="comm:RequestType"/>
                            <xsd:element name="name" type="xsd:string"/>
                            <xsd:element name="image" type="base64Binary" xmime:expectedContentTypes="image/png"/>
                            </xsd:sequence>
                            </xsd:complexType>

                            </xsd:schema>
                            </wsdl:types>
                            <wsdl:message name="LoadImageRequest">
                            <wsdlart element="schema:LoadImageRequest" name="LoadImageRequest">
                            </wsdlart>
                            </wsdl:message>
                            <wsdl:message name="StoreImageRequest">
                            <wsdlart element="schema:StoreImageRequest" name="StoreImageRequest">
                            </wsdlart>
                            </wsdl:message>
                            <wsdl:message name="LoadImageResponse">
                            <wsdlart element="schema:LoadImageResponse" name="LoadImageResponse">
                            </wsdlart>
                            </wsdl:message>
                            <wsdlortType name="ImageRepository">
                            <wsdl:operation name="LoadImage">
                            <wsdl:input message="schema:LoadImageRequest" name="LoadImageRequest">
                            </wsdl:input>
                            <wsdl:output message="schema:LoadImageResponse" name="LoadImageResponse">
                            </wsdl:output>
                            </wsdl:operation>
                            <wsdl:operation name="StoreImage">
                            <wsdl:input message="schema:StoreImageRequest" name="StoreImageRequest">
                            </wsdl:input>
                            </wsdl:operation>
                            </wsdlortType>
                            <wsdl:binding name="ImageRepositoryBinding" type="schema:ImageRepository">
                            <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
                            <wsdl:operation name="LoadImage">
                            <soap:operation soapAction=""/>
                            <wsdl:input name="LoadImageRequest">
                            <soap:body use="literal"/>
                            </wsdl:input>
                            <wsdl:output name="LoadImageResponse">
                            <soap:body use="literal"/>
                            </wsdl:output>
                            </wsdl:operation>
                            <wsdl:operation name="StoreImage">
                            <soap:operation soapAction=""/>
                            <wsdl:input name="StoreImageRequest">
                            <soap:body use="literal"/>
                            </wsdl:input>
                            </wsdl:operation>
                            </wsdl:binding>
                            <wsdl:service name="ImageRepositoryService">
                            <wsdlort binding="schema:ImageRepositoryBinding" name="ImageRepositoryPort">
                            <soap:address location="http://localhost:8080/mtom/"/>
                            </wsdlort>
                            </wsdl:service>
                            </wsdl:definitions>

                            Thanks
                            Sunil

                            Comment


                            • #15
                              OK, and if you point SoapUI at that same URL you get a 405 error?

                              Comment

                              Working...
                              X