Author: gnodet
Date: Thu Sep  7 02:51:50 2006
New Revision: 441037

URL: http://svn.apache.org/viewvc?view=rev&rev=441037
Log:
SM-567: Allow the soap style to be set for jsr181 endpoint
Modify the wsdl-first example to use document style

Added:
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/itests/PersonTest.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/Person.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceImpl.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceService.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/UnknownPersonFault.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPerson.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPersonResponse.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/ObjectFactory.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/UnknownPersonFault.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/package-info.java
    
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.wsdl
    
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.xml
Modified:
    incubator/servicemix/trunk/samples/wsdl-first/client.html
    
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
    
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl
    
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml
    
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java

Modified: incubator/servicemix/trunk/samples/wsdl-first/client.html
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/client.html?view=diff&rev=441037&r1=441036&r2=441037
==============================================================================
--- incubator/servicemix/trunk/samples/wsdl-first/client.html (original)
+++ incubator/servicemix/trunk/samples/wsdl-first/client.html Thu Sep  7 
02:51:50 2006
@@ -95,15 +95,12 @@
     <td>
   <textarea id="request" style="width:600px;height:400px" 
onKeyUp="send();"><?xml version="1.0" encoding="UTF-8"?>
 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
-              xmlns:ns="http://servicemix.apache.org/samples/wsdl-first";
               
xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types";>
-       <env:Body>
-        <ns:getPerson>
-               <tns:GetPersonRequest>
-                   <personId>world</personId>
-               </tns:GetPersonRequest>
-        </ns:getPerson>
-       </env:Body>
+  <env:Body>
+    <tns:GetPerson>
+      <tns:personId>world</tns:personId>
+    </tns:GetPerson>
+  </env:Body>
 </env:Envelope>
 
   </textarea>

Modified: 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java?view=diff&rev=441037&r1=441036&r2=441037
==============================================================================
--- 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
 (original)
+++ 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
 Thu Sep  7 02:51:50 2006
@@ -18,13 +18,13 @@
 
 import javax.jws.WebService;
 
-import org.apache.servicemix.samples.wsdl_first.types.GetPersonRequest;
+import org.apache.servicemix.samples.wsdl_first.types.GetPerson;
 import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;
 
 @WebService
 public class PersonImpl implements Person {
 
-    public GetPersonResponse getPerson(GetPersonRequest payload) throws 
UnknownPersonFault {
+    public GetPersonResponse getPerson(GetPerson payload) throws 
UnknownPersonFault {
         String personId = payload.getPersonId();
         if (personId == null || personId.length() == 0) {
             org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault 
fault = new org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault();

Modified: 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl?view=diff&rev=441037&r1=441036&r2=441037
==============================================================================
--- 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl
 (original)
+++ 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl
 Thu Sep  7 02:51:50 2006
@@ -28,8 +28,9 @@
        targetNamespace="http://servicemix.apache.org/samples/wsdl-first";>
 
        <wsdl:types>
-               <xsd:schema 
targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types";>
-                       <xsd:element name="GetPersonRequest">
+               <xsd:schema 
targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types";
+                           elementFormDefault="qualified">
+                       <xsd:element name="GetPerson">
                          <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="personId" 
type="xsd:string"/>
@@ -56,7 +57,7 @@
   </wsdl:types>
        
        <wsdl:message name="GetPersonRequest">
-               <wsdl:part name="payload" element="typens:GetPersonRequest"/>
+               <wsdl:part name="payload" element="typens:GetPerson"/>
        </wsdl:message>
        <wsdl:message name="GetPersonResponse">
                <wsdl:part name="payload" element="typens:GetPersonResponse"/>
@@ -66,7 +67,7 @@
        </wsdl:message>
 
     <wsdl:portType name="Person">
-               <wsdl:operation name="getPerson">
+               <wsdl:operation name="GetPerson">
                        <wsdl:input message="tns:GetPersonRequest"/>
                        <wsdl:output message="tns:GetPersonResponse"/>
                        <wsdl:fault name="UnknownPerson" 
message="tns:UnknownPersonFault"/>
@@ -75,7 +76,7 @@
        
     <wsdl:binding name="PersonSOAPBinding" type="tns:Person">
        <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"; />
-               <wsdl:operation name="getPerson">
+               <wsdl:operation name="GetPerson">
                        <wsdl:input>
                                <soap:body use="literal" />
                        </wsdl:input>

Modified: 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml?view=diff&rev=441037&r1=441036&r2=441037
==============================================================================
--- 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml
 (original)
+++ 
incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml
 Thu Sep  7 02:51:50 2006
@@ -24,6 +24,7 @@
     </classpath>
   
     <jsr181:endpoint 
pojoClass="org.apache.servicemix.samples.wsdl_first.PersonImpl"
-                     wsdlResource="classpath:person.wsdl" />
+                     wsdlResource="classpath:person.wsdl"
+                     style="document" />
 
 </beans>

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/itests/PersonTest.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/itests/PersonTest.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/itests/PersonTest.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/itests/PersonTest.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.itests;
+
+import java.io.StringWriter;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.servicemix.samples.wsdl_first.Person;
+import org.apache.servicemix.samples.wsdl_first.PersonServiceService;
+import org.apache.servicemix.samples.wsdl_first.types.GetPerson;
+import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;
+import org.apache.servicemix.tck.SpringTestSupport;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class PersonTest extends SpringTestSupport {
+
+    protected AbstractXmlApplicationContext createBeanFactory() {
+        return new 
ClassPathXmlApplicationContext("org/apache/servicemix/itests/person.xml");
+    }
+    
+    public void test() throws Exception {
+        PostMethod method = new 
PostMethod("http://localhost:8192/PersonService/";);
+        String req = "<env:Envelope 
xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"; " +
+                     "              
xmlns:tns=\"http://servicemix.apache.org/samples/wsdl-first/types\";>" +
+                     "  <env:Body>" +
+                     "    <tns:GetPerson>" +
+                     "       <tns:personId>world</tns:personId>" +
+                     "    </tns:GetPerson>" +
+                     "  </env:Body>" +
+                     "</env:Envelope>";
+        method.setRequestEntity(new StringRequestEntity(req));
+        new HttpClient().executeMethod(method);
+        System.err.println(method.getResponseBodyAsString());;
+        /*
+        Person p = new PersonServiceService().getsoap();
+        GetPerson gp = new GetPerson();
+        gp.setPersonId("gnodet");
+        GetPersonResponse gpr = p.getPerson(gp);
+        */
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/Person.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/Person.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/Person.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/Person.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,24 @@
+
+package org.apache.servicemix.samples.wsdl_first;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;
+
[EMAIL PROTECTED](name = "Person", targetNamespace = 
"http://servicemix.apache.org/samples/wsdl-first";)
[EMAIL PROTECTED](style = SOAPBinding.Style.DOCUMENT, use = 
SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface Person {
+
+
+    @WebMethod(operationName = "GetPerson", action = "")
+    @WebResult(name = "GetPersonResponse", targetNamespace = 
"http://servicemix.apache.org/samples/wsdl-first/types";)
+    public GetPersonResponse getPerson(
+        @WebParam(name = "GetPerson", targetNamespace = 
"http://servicemix.apache.org/samples/wsdl-first/types";)
+        org.apache.servicemix.samples.wsdl_first.types.GetPerson GetPerson)
+        throws UnknownPersonFault
+    ;
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.samples.wsdl_first;
+
+import javax.jws.WebService;
+
+import org.apache.servicemix.samples.wsdl_first.types.GetPerson;
+import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;
+
[EMAIL PROTECTED]
+public class PersonImpl implements Person {
+
+    public GetPersonResponse getPerson(GetPerson payload) throws 
UnknownPersonFault {
+        String personId = payload.getPersonId();
+        if (personId == null || personId.length() == 0) {
+            org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault 
fault = new org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault();
+            fault.setPersonId(personId);
+            throw new UnknownPersonFault(null, fault);
+        }
+        GetPersonResponse response = new GetPersonResponse();
+        response.setPersonId(payload.getPersonId());
+        response.setName("Guillaume");
+        response.setSsn("000-000-0000");
+        return response;
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceImpl.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceImpl.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceImpl.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,19 @@
+
+package org.apache.servicemix.samples.wsdl_first;
+
+import javax.jws.WebService;
+import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;
+
[EMAIL PROTECTED](serviceName = "PersonService", targetNamespace = 
"http://servicemix.apache.org/samples/wsdl-first";, endpointInterface = 
"org.apache.servicemix.samples.wsdl_first.Person")
+public class PersonServiceImpl
+    implements Person
+{
+
+
+    public GetPersonResponse 
getPerson(org.apache.servicemix.samples.wsdl_first.types.GetPerson GetPerson)
+        throws UnknownPersonFault
+    {
+        throw new UnsupportedOperationException();
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceService.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceService.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceService.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/PersonServiceService.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,46 @@
+
+package org.apache.servicemix.samples.wsdl_first;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
[EMAIL PROTECTED](targetNamespace = 
"http://servicemix.apache.org/samples/wsdl-first";, name = "PersonService", 
wsdlLocation = 
"file:/c:/java/servicemix/clean/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl")
+public class PersonServiceService
+    extends Service
+{
+
+    private static Map ports = new HashMap();
+    public static Class Person = 
org.apache.servicemix.samples.wsdl_first.Person.class;
+
+    static {
+        ports.put(new QName("http://servicemix.apache.org/samples/wsdl-first";, 
"soap"), Person);
+        ports.put(new QName("http://servicemix.apache.org/samples/wsdl-first";, 
"PersonServiceLocalPort"), Person);
+    }
+
+    public PersonServiceService()
+        throws MalformedURLException
+    {
+        super(new 
URL("file:/c:/java/servicemix/clean/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl"),
 new QName("http://servicemix.apache.org/samples/wsdl-first";, "PersonService"));
+    }
+
+    public static Map getPortClassMap() {
+        return ports;
+    }
+
+    @WebEndpoint(name = "soap")
+    public org.apache.servicemix.samples.wsdl_first.Person getsoap() {
+        return 
((org.apache.servicemix.samples.wsdl_first.Person)(this).getPort(new 
QName("http://servicemix.apache.org/samples/wsdl-first";, "soap"), Person));
+    }
+
+    @WebEndpoint(name = "PersonServiceLocalPort")
+    public org.apache.servicemix.samples.wsdl_first.Person 
getPersonServiceLocalPort() {
+        return 
((org.apache.servicemix.samples.wsdl_first.Person)(this).getPort(new 
QName("http://servicemix.apache.org/samples/wsdl-first";, 
"PersonServiceLocalPort"), Person));
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/UnknownPersonFault.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/UnknownPersonFault.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/UnknownPersonFault.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/UnknownPersonFault.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,27 @@
+
+package org.apache.servicemix.samples.wsdl_first;
+
+import javax.xml.ws.WebFault;
+
[EMAIL PROTECTED](name = "UnknownPersonFault", targetNamespace = 
"http://servicemix.apache.org/samples/wsdl-first/types";)
+public class UnknownPersonFault
+    extends Exception
+{
+
+    private org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault 
faultInfo;
+
+    public UnknownPersonFault(String message, 
org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault faultInfo) {
+        super(message);
+        this.faultInfo = faultInfo;
+    }
+
+    public UnknownPersonFault(String message, 
org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault faultInfo, 
Throwable t) {
+        super(message, t);
+        this.faultInfo = faultInfo;
+    }
+
+    public org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault 
getFaultInfo() {
+        return faultInfo;
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPerson.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPerson.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPerson.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPerson.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,64 @@
+
+package org.apache.servicemix.samples.wsdl_first.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &lt;element name="personId" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "", propOrder = {
+    "personId"
+})
[EMAIL PROTECTED](name = "GetPerson")
+public class GetPerson {
+
+    @XmlElement(required = true)
+    protected String personId;
+
+    /**
+     * Gets the value of the personId property.
+     * 
+     * @return
+     *     possible object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public String getPersonId() {
+        return personId;
+    }
+
+    /**
+     * Sets the value of the personId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public void setPersonId(String value) {
+        this.personId = value;
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPersonResponse.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPersonResponse.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPersonResponse.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/GetPersonResponse.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,120 @@
+
+package org.apache.servicemix.samples.wsdl_first.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &lt;element name="personId" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ssn" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="name" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "", propOrder = {
+    "personId",
+    "ssn",
+    "name"
+})
[EMAIL PROTECTED](name = "GetPersonResponse")
+public class GetPersonResponse {
+
+    @XmlElement(required = true)
+    protected String personId;
+    @XmlElement(required = true)
+    protected String ssn;
+    @XmlElement(required = true)
+    protected String name;
+
+    /**
+     * Gets the value of the personId property.
+     * 
+     * @return
+     *     possible object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public String getPersonId() {
+        return personId;
+    }
+
+    /**
+     * Sets the value of the personId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public void setPersonId(String value) {
+        this.personId = value;
+    }
+
+    /**
+     * Gets the value of the ssn property.
+     * 
+     * @return
+     *     possible object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public String getSsn() {
+        return ssn;
+    }
+
+    /**
+     * Sets the value of the ssn property.
+     * 
+     * @param value
+     *     allowed object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public void setSsn(String value) {
+        this.ssn = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/ObjectFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/ObjectFactory.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/ObjectFactory.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/ObjectFactory.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,56 @@
+
+package org.apache.servicemix.samples.wsdl_first.types;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.apache.servicemix.samples.wsdl_first.types package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
[EMAIL PROTECTED]
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of 
schema derived classes for package: 
org.apache.servicemix.samples.wsdl_first.types
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of [EMAIL PROTECTED] GetPersonResponse }
+     * 
+     */
+    public GetPersonResponse createGetPersonResponse() {
+        return new GetPersonResponse();
+    }
+
+    /**
+     * Create an instance of [EMAIL PROTECTED] GetPerson }
+     * 
+     */
+    public GetPerson createGetPerson() {
+        return new GetPerson();
+    }
+
+    /**
+     * Create an instance of [EMAIL PROTECTED] UnknownPersonFault }
+     * 
+     */
+    public UnknownPersonFault createUnknownPersonFault() {
+        return new UnknownPersonFault();
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/UnknownPersonFault.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/UnknownPersonFault.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/UnknownPersonFault.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/UnknownPersonFault.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,64 @@
+
+package org.apache.servicemix.samples.wsdl_first.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &lt;element name="personId" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "", propOrder = {
+    "personId"
+})
[EMAIL PROTECTED](name = "UnknownPersonFault")
+public class UnknownPersonFault {
+
+    @XmlElement(required = true)
+    protected String personId;
+
+    /**
+     * Gets the value of the personId property.
+     * 
+     * @return
+     *     possible object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public String getPersonId() {
+        return personId;
+    }
+
+    /**
+     * Sets the value of the personId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     [EMAIL PROTECTED] String }
+     *     
+     */
+    public void setPersonId(String value) {
+        this.personId = value;
+    }
+
+}

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/package-info.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/package-info.java?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/package-info.java
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/java/org/apache/servicemix/samples/wsdl_first/types/package-info.java
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,2 @@
[EMAIL PROTECTED](namespace = 
"http://servicemix.apache.org/samples/wsdl-first/types";, elementFormDefault = 
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.servicemix.samples.wsdl_first.types;

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.wsdl?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.wsdl
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.wsdl
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,98 @@
+<?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.
+
+-->
+<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) 
$ -->
+<wsdl:definitions name="wsdl-first"
+       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:tns="http://servicemix.apache.org/samples/wsdl-first";
+       xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types";
+       targetNamespace="http://servicemix.apache.org/samples/wsdl-first";>
+
+       <wsdl:types>
+               <xsd:schema 
targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types";
+                           elementFormDefault="qualified">
+                       <xsd:element name="GetPerson">
+                         <xsd:complexType>
+                                       <xsd:sequence>
+                                               <xsd:element name="personId" 
type="xsd:string"/>
+                                       </xsd:sequence>
+                               </xsd:complexType>
+                       </xsd:element>
+                       <xsd:element name="GetPersonResponse">
+                         <xsd:complexType>
+                                       <xsd:sequence>
+                                           <xsd:element name="personId" 
type="xsd:string"/>
+                                               <xsd:element name="ssn" 
type="xsd:string"/>
+                                               <xsd:element name="name" 
type="xsd:string"/>
+                                       </xsd:sequence>
+                               </xsd:complexType>
+                       </xsd:element>
+                       <xsd:element name="UnknownPersonFault">
+                         <xsd:complexType>
+                                       <xsd:sequence>
+                                           <xsd:element name="personId" 
type="xsd:string"/>
+                                       </xsd:sequence>
+                               </xsd:complexType>
+                       </xsd:element>
+               </xsd:schema>
+  </wsdl:types>
+       
+       <wsdl:message name="GetPersonRequest">
+               <wsdl:part name="payload" element="typens:GetPerson"/>
+       </wsdl:message>
+       <wsdl:message name="GetPersonResponse">
+               <wsdl:part name="payload" element="typens:GetPersonResponse"/>
+       </wsdl:message>
+       <wsdl:message name="UnknownPersonFault">
+               <wsdl:part name="payload" element="typens:UnknownPersonFault"/>
+       </wsdl:message>
+
+    <wsdl:portType name="Person">
+               <wsdl:operation name="GetPerson">
+                       <wsdl:input message="tns:GetPersonRequest"/>
+                       <wsdl:output message="tns:GetPersonResponse"/>
+                       <wsdl:fault name="UnknownPerson" 
message="tns:UnknownPersonFault"/>
+               </wsdl:operation>
+       </wsdl:portType>
+       
+    <wsdl:binding name="PersonSOAPBinding" type="tns:Person">
+       <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"; />
+               <wsdl:operation name="GetPerson">
+                       <wsdl:input>
+                               <soap:body use="literal" />
+                       </wsdl:input>
+                       <wsdl:output>
+                               <soap:body use="literal" />
+                       </wsdl:output>
+                       <wsdl:fault name="UnknownPerson">
+                               <soap:fault use="literal" name="UnknownPerson" 
/>
+                       </wsdl:fault>
+       </wsdl:operation>
+   </wsdl:binding>
+
+       <wsdl:service name="PersonService">
+       <wsdl:port binding="tns:PersonSOAPBinding" name="soap">
+           <soap:address location="http://localhost:8192/PersonService/"; />
+       </wsdl:port>
+   </wsdl:service>
+
+</wsdl:definitions>

Added: 
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.xml
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.xml?view=auto&rev=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.xml
 (added)
+++ 
incubator/servicemix/trunk/servicemix-itests/src/test/resources/org/apache/servicemix/itests/person.xml
 Thu Sep  7 02:51:50 2006
@@ -0,0 +1,56 @@
+<?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.
+
+-->
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
+            xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";
+            xmlns:http="http://servicemix.apache.org/http/1.0";
+       xmlns:person="http://servicemix.apache.org/samples/wsdl-first";>
+       
+       <sm:container id="jbi" embedded="true" >
+               <sm:activationSpecs>
+
+                       <sm:activationSpec>
+                               <sm:component>
+                                       <jsr181:component>
+                                               <jsr181:endpoints>
+                                                 <jsr181:endpoint 
pojoClass="org.apache.servicemix.samples.wsdl_first.PersonImpl"
+                                                   
wsdlResource="classpath:org/apache/servicemix/itests/person.wsdl"
+                                                   style="document" />
+                                               </jsr181:endpoints>
+                                       </jsr181:component>
+                               </sm:component>
+                       </sm:activationSpec>
+
+                       <sm:activationSpec>
+                               <sm:component>
+                                       <http:component>
+                                               <http:endpoints>
+                                                 <http:endpoint 
service="person:PersonService"
+                                                   endpoint="soap"
+                                                   role="consumer" 
+                                                   
locationURI="http://0.0.0.0:8192/PersonService/";
+                                                   soap="true" />             
+                                               </http:endpoints>
+                                       </http:component>
+                               </sm:component>
+                       </sm:activationSpec>
+
+               </sm:activationSpecs>
+       </sm:container>
+</beans>

Modified: 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java?view=diff&rev=441037&r1=441036&r2=441037
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
 Thu Sep  7 02:51:50 2006
@@ -70,6 +70,7 @@
     protected String annotations;
     protected String typeMapping;
     protected String serviceInterface;
+    protected String style = "wrapped";
     
     protected ServiceEndpoint activated;
     protected Service xfireService;
@@ -82,6 +83,23 @@
     }
     
     /**
+     * @return the style
+     */
+    public String getStyle() {
+        return style;
+    }
+
+    /**
+     * Service style: can be <code>rpc</code>, <code>document</code>,
+     * <code>wrapped</code> or <code>message</code>.
+     * Default to <code>wrapped</code>
+     * @param style the style to set
+     */
+    public void setStyle(String style) {
+        this.style = style;
+    }
+
+    /**
      * @return the wsdlResource
      */
     public Resource getWsdlResource() {
@@ -232,7 +250,9 @@
         }
         Map props = new HashMap();
         props.put(ObjectServiceFactory.PORT_TYPE, interfaceName);
-        props.put(ObjectServiceFactory.STYLE, SoapConstants.STYLE_WRAPPED);
+        if (style != null) {
+            props.put(ObjectServiceFactory.STYLE, style);
+        }
         props.put(ObjectServiceFactory.USE, SoapConstants.USE_LITERAL);
         if (serviceInterface != null) {
             props.put("annotations.allow.interface", "true");


Reply via email to