You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by em...@apache.org on 2007/04/17 13:09:57 UTC
svn commit: r529565 - in /incubator/cxf/trunk:
rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/
tools/javato/src/test/java/org/apache/cxf/tools/java2wsd...
Author: ema
Date: Tue Apr 17 04:09:56 2007
New Revision: 529565
URL: http://svn.apache.org/viewvc?view=rev&rev=529565
Log:
Fixed issue CXF-540
Modified:
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_async.wsdl
incubator/cxf/trunk/tools/javato/src/test/resources/java2wsdl_wsdl/hello_world_async.wsdl
Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=529565&r1=529564&r2=529565
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Tue Apr 17 04:09:56 2007
@@ -252,7 +252,6 @@
protected void initializeWSDLOperations() {
Method[] methods = serviceClass.getMethods();
Arrays.sort(methods, new MethodComparator());
- getInterfaceInfo();
InterfaceInfo intf = getInterfaceInfo();
@@ -264,7 +263,6 @@
}
}
-
for (OperationInfo o : intf.getOperations()) {
Method selected = null;
for (Map.Entry<QName, Method> m : validMethods.entrySet()) {
@@ -444,7 +442,6 @@
// Setup the input message
MessageInfo inMsg = op.createMessage(this.getInputMessageName(op, method));
op.setInput(inMsg.getName().getLocalPart(), inMsg);
-
for (int j = 0; j < paramClasses.length; j++) {
if (isInParam(method, j)) {
final QName q = getInParameterName(op, method, j);
@@ -522,6 +519,9 @@
if (part.getElementQName() == null) {
part.setElementQName(inMsg.getName());
}
+ if (getRequestWrapper(method) != null) {
+ part.setTypeClass(this.getRequestWrapper(method));
+ }
}
protected void createOutputWrappedMessageParts(OperationInfo op, Method method, MessageInfo inMsg) {
@@ -538,6 +538,10 @@
if (part.getElementQName() == null) {
part.setElementQName(inMsg.getName());
+ }
+
+ if (this.getResponseWrapper(method) != null) {
+ part.setTypeClass(this.getResponseWrapper(method));
}
}
Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?view=diff&rev=529565&r1=529564&r2=529565
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java (original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java Tue Apr 17 04:09:56 2007
@@ -43,6 +43,7 @@
builder.setBus(BusFactory.getDefaultBus());
}
+
@Test
public void testGetOutputFile() {
builder.setServiceClass(Stock.class);
@@ -68,7 +69,6 @@
//FIXME: CXF-519
@Test
- @Ignore
public void testAsync() throws Exception {
builder.setServiceClass(org.apache.hello_world_async_soap_http.GreeterAsync.class);
ServiceInfo service = builder.build();
Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_async.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_async.wsdl?view=diff&rev=529565&r1=529564&r2=529565
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_async.wsdl (original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_hello_world_async.wsdl Tue Apr 17 04:09:56 2007
@@ -1,87 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<wsdl:definitions
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:http-conf="http://schemas.iona.com/transports/http/configuration"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:tns="http://apache.org/hello_world_async_soap_http"
- xmlns:x1="http://apache.org/hello_world_async_soap_http/types"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
- targetNamespace="http://apache.org/hello_world_async_soap_http"
- name="HelloWorld">
- <jaxws:bindings>
- <enableAsyncMapping>true</enableAsyncMapping>
- </jaxws:bindings>
- <wsdl:types>
- <schema
- targetNamespace="http://apache.org/hello_world_async_soap_http/types"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:x1="http://apache.org/hello_world_async_soap_http/types"
- elementFormDefault="qualified">
- <element name="greetMeSometime">
- <complexType>
- <sequence>
- <element name="requestType" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="greetMeSometimeResponse">
- <complexType>
- <sequence>
- <element name="responseType" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- </schema>
- </wsdl:types>
- <wsdl:message name="greetMeSometimeRequest">
- <wsdl:part name="in" element="x1:greetMeSometime"/>
- </wsdl:message>
- <wsdl:message name="greetMeSometimeResponse">
- <wsdl:part name="out" element="x1:greetMeSometimeResponse"/>
- </wsdl:message>
- <wsdl:portType name="GreeterAsync">
- <wsdl:operation name="greetMeSometime">
- <wsdl:input name="greetMeSometimeRequest" message="tns:greetMeSometimeRequest"/>
- <wsdl:output name="greetMeSometimeResponse" message="tns:greetMeSometimeResponse"/>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="GreeterAsync_SOAPBinding" type="tns:GreeterAsync">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="greetMeSometime">
- <soap:operation style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="SOAPService">
- <wsdl:port name="SoapPort" binding="tns:GreeterAsync_SOAPBinding">
- <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
- <http-conf:client/>
- <http-conf:server/>
- </wsdl:port>
- </wsdl:service>
+<wsdl:definitions name="GreeterAsyncService" targetNamespace="http://apache.org/hello_world_async_soap_http" xmlns:ns1="http://apache.org/hello_world_async_soap_http" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://apache.org/hello_world_async_soap_http/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://apache.org/hello_world_async_soap_http/types" version="1.0">
+<xs:element name="greetMeSometime">
+<xs:complexType>
+<xs:sequence>
+<xs:element form="qualified" name="requestType" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="greetMeSometimeResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element form="qualified" name="responseType" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+</xs:schema>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/hello_world_async_soap_http" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://apache.org/hello_world_async_soap_http">
+<xsd:element name="greetMeSometime">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="requestType" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="greetMeSometimeResponse">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="responseType" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+</xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="greetMeSometime">
+ <wsdl:part name="greetMeSometime" element="ns2:greetMeSometime">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="greetMeSometimeResponse">
+ <wsdl:part name="greetMeSometimeResponse" element="ns2:greetMeSometimeResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="GreeterAsync">
+ <wsdl:operation name="greetMeSometime">
+ <wsdl:input name="greetMeSometime" message="ns1:greetMeSometime">
+ </wsdl:input>
+ <wsdl:output name="greetMeSometimeResponse" message="ns1:greetMeSometimeResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="GreeterAsyncServiceSoapBinding" type="ns1:GreeterAsync">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="greetMeSometime">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeSometime">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="greetMeSometimeResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="GreeterAsyncService">
+ <wsdl:port name="GreeterAsyncPort" binding="ns1:GreeterAsyncServiceSoapBinding">
+ <soap:address location="http://localhost:9090"/>
+ </wsdl:port>
+ </wsdl:service>
</wsdl:definitions>
Modified: incubator/cxf/trunk/tools/javato/src/test/resources/java2wsdl_wsdl/hello_world_async.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/resources/java2wsdl_wsdl/hello_world_async.wsdl?view=diff&rev=529565&r1=529564&r2=529565
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/resources/java2wsdl_wsdl/hello_world_async.wsdl (original)
+++ incubator/cxf/trunk/tools/javato/src/test/resources/java2wsdl_wsdl/hello_world_async.wsdl Tue Apr 17 04:09:56 2007
@@ -29,7 +29,7 @@
targetNamespace="http://apache.org/hello_world_async_soap_http"
name="HelloWorld">
<jaxws:bindings>
- <enableAsyncMapping>true</enableAsyncMapping>
+ <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
</jaxws:bindings>
<wsdl:types>
<schema