[ 
https://issues.apache.org/jira/browse/CXF-4676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13549362#comment-13549362
 ] 

Freeman Fang commented on CXF-4676:
-----------------------------------

Hi Iris,

We definitely have more developers/advocators who are on linux/mac in open 
source community, so yeah, if you can setup a linux machine that could be 
great. 
Another hint is that please use CLI tool to run the whole test, to generate the 
patch. You can use the IDE to debug, but you need run whole test using "mvn 
clean install" and ensure everything is OK before you submit a patch.

Back to your test patch, it's in cxf-testutils folder but there's no pom.xml so 
it can't get build, how you generate the patch? With eclipse? I suggest you use 
"svn diff ..." CLI , please take a look at [1],  the "How to submit patch" 
chapter to get more details.
Basically, if you need cxf-codegen-plugin to auto-generate code from the wsdl, 
you can put the wsdl in testutils module, otherwise you can just put the wsdl 
in systests/jaxws module, in the same module with the test you added.

Could you please revise accordingly and  re-append the patch? You can put all 
necessary changes in one patch file.

[1]http://cxf.apache.org/getting-involved.html

Freeman
                
> Partial WSDL support in CXF 
> ----------------------------
>
>                 Key: CXF-4676
>                 URL: https://issues.apache.org/jira/browse/CXF-4676
>             Project: CXF
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 2.6.2
>            Reporter: iris ding
>            Assignee: Freeman Fang
>         Attachments: cxf-4676.patch, cxf-4676test.patch
>
>
> I have one SEI defined as below:
> @WebService(wsdlLocation="WEB-INF/wsdl/AddNumbersImplPartial1Service.wsdl")
> public class AddNumbersImplPartial1 {
>        
>         public int addTwoNumbers(int number1, int number2) throws 
> AddNegativeNumbersException {
>                 if (number1 < 0 || number2 < 0) {
>                         throw new AddNegativeNumbersException("Negative 
> number submitted !! ", "Numbers: " +
>                                                               number1 + ", " 
> + number2);
>                 }
>                 return number1 + number2;
>         }
> }
> The WEB-INF/wsdl/AddNumbersImplPartial1Service.wsdl is not complete, it only 
> contains to the porttype part:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <definitions
> targetNamespace="http://serverpartial1.partialwsdl.annotations/"; 
> name="AddNumbersImplPartial1Service"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:tns="http://serverpartial1.partialwsdl.annotations/";
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
>   <types>
>     <xsd:schema>
>       <xsd:import namespace="http://serverpartial1.partialwsdl.annotations/"; 
> schemaLocation="AddNumbersImplPartial1Service_schema1.xsd"/>
>     </xsd:schema>
>   </types>
>   <message name="addTwoNumbers">
>     <part name="parameters" element="tns:addTwoNumbers"/>
>   </message>
>   <message name="addTwoNumbersResponse">
>     <part name="parameters" element="tns:addTwoNumbersResponse"/>
>   </message>
>   <message name="AddNegativeNumbersException">
>     <part name="fault" element="tns:AddNegativeNumbersException"/>
>   </message>
>   <portType name="AddNumbersImplPartial1">
>     <operation name="addTwoNumbers">
>       <input message="tns:addTwoNumbers"/>
>       <output message="tns:addTwoNumbersResponse"/>
>       <fault name="AddNegativeNumbersException" 
> message="tns:AddNegativeNumbersException"/>
>     </operation>
>   </portType>
>  
> </definitions>
> Now if I put the war file into tomcat and let it use CXF, the service can not 
> be deployed successfully. In CXF, when it calls WSDLServiceFactory.create, it 
> will simply get the service name from wsdl file and in our case, since it is 
> empty, it will throw exception and service deployment failed. you can 
> reference below part:
> javax.wsdl.Service wsdlService = definition.getService(serviceName);
>             if (wsdlService == null) {
>                 throw new ServiceConstructionException(new 
> Message("NO_SUCH_SERVICE_EXC", LOG, serviceName));
>             }
> But per jaxws 2.2 spec, in chapter 5.2.5.5:
> 5.2.5.5 Application-specified PortType
> No metadata document contains a definition for the sought-after service S, 
> but a metadata document, say
> D, contains a definition for the WSDL portType whose qualified name, say P, 
> matches that specified by the
> endpoint being published. In this case, a JAX-WS implementation MUST create a 
> new description for S,
> including an appropriate WSDL binding element referencing portType P. The 
> metadata document D MUST
> be imported/included so that the published contract uses the definition of P 
> provided by D. No schema generation
> occurs,as P is assumed to embed or import schema definitions for all the 
> types/elements it requires.
> Like in the previous case, the implementation MUST override any location and 
> schemaLocation attributes.
> It is an error if more than one metadata document contains a definition for 
> the sought-after portType
> P.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to