Envelope version mismatch

2,746 views
Skip to first unread message

Dave

unread,
Aug 31, 2011, 1:44:33 PM8/31/11
to scalaxb
Hi Eugene,
I was trying to make a client server wsdl 1.1 with soap1.2 application
with Scalaxb and Dispatch, but I got an Envelope version mismatch.

SEVERE: Couldn't create SOAP message. Expecting Envelope in namespace
http://sch
emas.xmlsoap.org/soap/envelope/, but got http://www.w3.org/2003/05/soap-envelope
com.sun.xml.internal.ws.protocol.soap.VersionMismatchException:
Couldn't create
SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/en
velope/, but got http://www.w3.org/2003/05/soap-envelope

I am searching all day, but I don't know why it is expecting namespace
http://schemas.xmlsoap.org/soap/en
velope/ (wsdl, annotations, dependencies?)

Something else, maybe this issue is already fix in the trunk:
I have embedded the schema because when I import it using xs:import,
it generates wstest.scala twice and thus overwriting each other.
The trait WSTest with the webmethod test is missing then, but case
class Test and TestResponse and the other case classes are there.

Greetings,
Dave

Scala 2.9.1.RC4
JDK7 b147
Windows 7 Home Premium 32 bit + SP1
scalaxb 0.6.2

wstest.wsdl
===========
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:tns="org.scalaxbtest/WS"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/
soap12/"
targetNamespace="org.scalaxbtest/WS"
name="WSTest">
<wsdl:types>
<xs:schema version="1.0"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="org.scalaxbtest/WS"
xmlns:ws="org.scalaxbtest/WS"
targetNamespace="org.scalaxbtest/WS">

<xs:complexType name="Child">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="age" type="xs:int"/>
<xs:element name="birthdate" type="xs:date"
minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Address">
<xs:sequence>
<xs:element name="street" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Person">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="ws:Address"/>
<xs:element name="children">
<xs:complexType>
<xs:sequence>
<xs:element name="child" type="ws:Child"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>

<xs:element name="test" type="tns:test"></xs:element>

<xs:element name="testResponse" type="tns:testResponse"></
xs:element>

<xs:complexType name="test">
<xs:sequence>
<xs:element name="person" type="ws:Person"
minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="testResponse">
<xs:sequence>
<xs:element name="return" type="xs:string"
minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="test">
<wsdl:part name="parameters" element="tns:test"></wsdl:part>
</wsdl:message>
<wsdl:message name="testResponse">
<wsdl:part name="parameters" element="tns:testResponse"></
wsdl:part>
</wsdl:message>
<wsdl:portType name="WSTest">
<wsdl:operation name="test">
<wsdl:input wsam:Action="org.scalaxbtest/WS/
org.scalaxbtest/WS/testRequest" message="tns:test"></wsdl:input>
<wsdl:output wsam:Action="org.scalaxbtest/WS/
org.scalaxbtest/WS/testResponse" message="tns:testResponse"></
wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WSTest" type="tns:WSTest">
<wsoap12:binding transport="http://schemas.xmlsoap.org/soap/
http" style="document"></wsoap12:binding>
<wsdl:operation name="test">
<wsoap12:operation soapAction=""></wsoap12:operation>
<wsdl:input>
<wsoap12:body use="literal"></wsoap12:body>
</wsdl:input>
<wsdl:output>
<wsoap12:body use="literal"></wsoap12:body>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WSTest">
<wsdl:port name="WSTest" binding="tns:WSTest">
<wsoap12:address location="http://localhost:8080/wstest"></
wsoap12:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


webserviceserver.scala
======================
package webserviceserver
import scalaxb._
import ws._
import javax.xml.ws.Endpoint
import javax.jws.WebParam
import javax.jws.WebService

@WebService(targetNamespace="org.scalaxbtest/WS",
name="org.scalaxbtest/WS", portName="test", serviceName="WSTest")
private class MinimalSoapServer extends WSTest{
def test(@WebParam(name = "person") person : Option[Person]) =
{ person match {
case Some(p) =>
{ println(p); Right(Some("Hi " + p.name)) }
case _ => Left(new
Fault("error", person))}
}
}
object MinimalSoapServer extends App {
val endpoint = Endpoint.publish("http://localhost:8080/wstest",
new MinimalSoapServer())
System.out.println("Waiting for requests...")
}


Used Dispatch dependencies in CLASSPATH
=======================================

commons-logging-1.1.1.jar
dispatch-core_2.9.0-1-0.8.3.jar
dispatch-futures_2.9.0-1-0.8.3.jar
dispatch-http_2.9.0-1-0.8.3.jar
dispatch-lift-json_2.9.0-1-0.8.3.jar
httpclient-4.1.jar
httpcore-4.1.jar

C:\scala-2.9.1.RC4\examples\scalaxb\webservicesoap\app>scala -cp .;..
webservice
server.MinimalSoapServer
Waiting for requests...
aug 31, 2011 5:34:14 PM
com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpT
oolkit handle
SEVERE: Couldn't create SOAP message. Expecting Envelope in namespace
http://sch
emas.xmlsoap.org/soap/envelope/, but got http://www.w3.org/2003/05/soap-envelope

com.sun.xml.internal.ws.protocol.soap.VersionMismatchException:
Couldn't create
SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/en
velope/, but got http://www.w3.org/2003/05/soap-envelope
at
com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCod
ec.java:167)
at
com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCod
ec.java:292)
at
com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCod
ec.java:118)
at
com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingC
odec.java:343)
at
com.sun.xml.internal.ws.transport.http.HttpAdapter.decodePacket(HttpA
dapter.java:321)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.access
$400(HttpAda
pter.java:81)
at com.sun.xml.internal.ws.transport.http.HttpAdapter
$HttpToolkit.handle
(HttpAdapter.java:576)
at
com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter
.java:244)
at
com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExc
hange(WSHttpHandler.java:95)
at
com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WS
HttpHandler.java:80)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:
77)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:
80)
at sun.net.httpserver.ServerImpl$Exchange
$LinkHandler.handle(ServerImpl.
java:665)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:
77)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:
637)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor
.java:603)
at java.lang.Thread.run(Thread.java:722)




Copy and pastable lines
=======================

import scalaxb._
import ws._
val service = (new WSTestBindings with SoapClients with
DispatchHttpClients {}).service
val xgc =
javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar("2004-09-04T18:06:22Z")
val caseclassperson =
Person("joe",Address("Bulevard","Helsinki"),Children(Child("Mary",
5,Some(xgc)),Child("Mazy",3, None)))
println(service.test(Some(caseclassperson)))


REPL session (MinimalSoapServer is running in other console)
============================================================
C:\scala-2.9.1.RC4\examples\scalaxb\webservicesoap>scala
Welcome to Scala version 2.9.1.RC4 (Java HotSpot(TM) Client VM, Java
1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scalaxb._
import scalaxb._

scala> import ws._
import ws._

scala> val service = (new WSTestBindings with SoapClients with
DispatchHttpClien
ts {}).service
service: ws.WSTest = ws.XMLProtocol$WSTestBindings$$anon$7@106f265

scala> val xgc =
javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregori
anCalendar("2004-09-04T18:06:22Z")
xgc: javax.xml.datatype.XMLGregorianCalendar = 2004-09-04T18:06:22Z

scala> val caseclassperson =
Person("joe",Address("Bulevard","Helsinki"),Childre
n(Child("Mary",5,Some(xgc)),Child("Mazy",3, None)))
caseclassperson: ws.Person =
Person(joe,Address(Bulevard,Helsinki),Children(Wrap
pedArray(Child(Mary,5,Some(2004-09-04T18:06:22Z)), Child(Mazy,
3,None))))

scala> println(service.test(Some(caseclassperson)))
INF: [console logger] dispatch: localhost POST /wstest HTTP/1.1
dispatch.StatusCode: Unexpected response code: 500
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/
soap/envel
ope/"><S:Body><S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-
envelope"><faul
tcode>S:VersionMismatch</faultcode><faultstring>Couldn't create SOAP
message. Ex
pecting Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/,
but got
http://www.w3.org/2003/05/soap-envelope</faultstring></S:Fault></S:Body></S:Env
elope>
at dispatch.HttpExecutor$$anonfun$when$1.apply(executor.scala:
53)
at dispatch.HttpExecutor$$anonfun$when$1.apply(executor.scala:
50)
at dispatch.HttpExecutor$$anonfun$x$2.apply(executor.scala:41)
at dispatch.HttpExecutor$$anonfun$x$2.apply(executor.scala:36)
at dispatch.BlockingHttp$$anonfun$execute$1.apply(Http.scala:
54)
at dispatch.Http.pack(Http.scala:25)
at dispatch.BlockingHttp$class.execute(Http.scala:53)
at dispatch.Http.execute(Http.scala:21)
at dispatch.HttpExecutor$class.x(executor.scala:36)
at dispatch.Http.x(Http.scala:21)
at dispatch.HttpExecutor$class.when(executor.scala:50)
at dispatch.Http.when(Http.scala:21)
at dispatch.HttpExecutor$class.apply(executor.scala:60)
at dispatch.Http.apply(Http.scala:21)
at scalaxb.DispatchHttpClients$DispatchHttpClient
$class.request(httpclie
nts_dispatch.scala:12)
at scalaxb.DispatchHttpClients$$anon
$1.request(httpclients_dispatch.scal
a:4)
at scalaxb.SoapClients$SoapClient$class.soapRequest(soap.scala:
38)
at scalaxb.SoapClients$$anon$1.soapRequest(soap.scala:24)
at scalaxb.SoapClients$SoapClient
$class.requestResponse(soap.scala:47)
at scalaxb.SoapClients$$anon$1.requestResponse(soap.scala:24)
at ws.XMLProtocol$WSTestBindings$WSTestBinding
$class.test(wstest_xmlprot
ocol.scala:130)
at ws.XMLProtocol$WSTestBindings$$anon
$7.test(wstest_xmlprotocol.scala:1
25)
at .<init>(<console>:17)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at scala.tools.nsc.interpreter.IMain
$ReadEvalPrint.call(IMain.scala:704)

at scala.tools.nsc.interpreter.IMain$Request$$anonfun
$14.apply(IMain.sca
la:920)
at scala.tools.nsc.interpreter.Line$$anonfun$1.apply$mcV
$sp(Line.scala:4
3)
at scala.tools.nsc.io.package$$anon$2.run(package.scala:25)
at java.lang.Thread.run(Thread.java:722)

eugene yokota

unread,
Aug 31, 2011, 2:06:57 PM8/31/11
to sca...@googlegroups.com
I think the default binding of the JAX-WS is SOAP 1.1 over HTTP.
You need to tell the server to publish SOAP 1.2 service.

I'll look into the other issue later.

-eugene

Dave

unread,
Aug 31, 2011, 3:01:34 PM8/31/11
to scalaxb


On 31 aug, 20:06, eugene yokota <eed3s...@gmail.com> wrote:
> I think the default binding of the JAX-WS is SOAP 1.1 over HTTP.
> You need to tell the server to publish SOAP 1.2 service....
>
> meer lezen »
>
> I'll look into the other issue later.
>
> -eugene
Okay,

After taking a break, I did another small test.

When I try
@BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING) I
get an error message when starting the server.
With
@BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING)
it starts fine but of coarse then I have the envelop version mismatch
error again when sending a message.

webserviceserver.scala
======================
package webserviceserver
import scalaxb._
import ws._
import javax.xml.ws.{Endpoint,BindingType}
import javax.jws.{WebParam,WebService,WebMethod}

@WebService(targetNamespace="org.scalaxbtest/WS",
name="org.scalaxbtest/WS", portName="test", serviceName="WSTest")
@BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
private class MinimalSoapServer extends WSTest{
@WebMethod
def test(@WebParam(name = "person") person : Option[Person]) =
{ person match {
case Some(p) =>
{ println(p); Right(Some("Hi " + p.name)) }
case _ => Left(new
Fault("error", person))}
}
}
object MinimalSoapServer extends App {
val endpoint = Endpoint.publish("http://localhost:8080/wstest",
new MinimalSoapServer())
System.out.println("Waiting for requests...")
}

C:\scala-2.9.1.RC4\examples\scalaxb\webservicesoap\app>scala -cp .;..
webservice
server.MinimalSoapServer
com.sun.xml.internal.ws.server.ServerRtException: Cannot generate WSDL
for bindi
ng "http://www.w3.org/2003/05/soap/bindings/HTTP/"
at
com.sun.xml.internal.ws.server.EndpointFactory.generateWSDL(EndpointF
actory.java:421)
at
com.sun.xml.internal.ws.server.EndpointFactory.createEndpoint(Endpoin
tFactory.java:198)
at
com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:
498)
at
com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndp
oint(EndpointImpl.java:246)
at
com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(En
dpointImpl.java:170)
at
com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(Pro
viderImpl.java:113)
at javax.xml.ws.Endpoint.publish(Endpoint.java:240)
at webserviceserver.MinimalSoapServer$delayedInit
$body.apply(webservices
erver.scala:17)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV
$sp(AbstractFunction0.scala:
12)
at scala.App$$anonfun$main$1.apply(App.scala:60)
at scala.App$$anonfun$main$1.apply(App.scala:60)
at scala.collection.LinearSeqOptimized
$class.foreach(LinearSeqOptimized.
scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.generic.TraversableForwarder
$class.foreach(Traversab
leForwarder.scala:30)
at scala.App$class.main(App.scala:60)
at webserviceserver.MinimalSoapServer
$.main(webserviceserver.scala:16)
at
webserviceserver.MinimalSoapServer.main(webserviceserver.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run
$1.apply(ScalaClass
Loader.scala:78)
at scala.tools.nsc.util.ScalaClassLoader
$class.asContext(ScalaClassLoade
r.scala:24)
at scala.tools.nsc.util.ScalaClassLoader
$URLClassLoader.asContext(ScalaC
lassLoader.scala:88)
at scala.tools.nsc.util.ScalaClassLoader
$class.run(ScalaClassLoader.scal
a:78)
at scala.tools.nsc.util.ScalaClassLoader
$URLClassLoader.run(ScalaClassLo
ader.scala:101)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
at scala.tools.nsc.ObjectRunner
$.runAndCatch(ObjectRunner.scala:40)
at scala.tools.nsc.MainGenericRunner.runTarget
$1(MainGenericRunner.scala
:56)
at
scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)

at scala.tools.nsc.MainGenericRunner
$.main(MainGenericRunner.scala:89)
at
scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

eugene yokota

unread,
Aug 31, 2011, 3:21:19 PM8/31/11
to sca...@googlegroups.com
Writing SOAP server using JAX-WS is something out of scope of my knowledge, but here's a sample code I found:

-eugene

Dave

unread,
Aug 31, 2011, 5:59:17 PM8/31/11
to scalaxb
But what are you using on the server side?

On 31 aug, 21:21, eugene yokota <eed3s...@gmail.com> wrote:
> Writing SOAP server using JAX-WS is something out of scope of my knowledge,
> but here's a sample code I found:http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv/jws....
> > scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

eugene yokota

unread,
Aug 31, 2011, 6:11:39 PM8/31/11
to sca...@googlegroups.com
WSDL binding is something I implemented by user demand, and I personally don't use it from Scala. 
So far the integration tests are written against public services, likely implemented in .NET.

-eugene

Dave

unread,
Sep 1, 2011, 6:34:37 AM9/1/11
to scalaxb
Hi Eugene,
will there be support for soap1.1 in scalaxb?

I made a quick & dirty soap1.1 support by copying and replacing
namespaces and renaming some classes and traits and so on but it would
be handy if it would be generated automatically. I think it requires a
bit of refactoring, though, to avoid code duplication.

I tested also the soap1.2 header and found that it is still soap1.1
In a soap1.2 header SOAPAction is removed and Content-Type is
application/soap+xml

I found this:
soap1.2
=======
Host: localhost:8080
Content-Length: 690
SOAPAction: ""
Connection: Keep-Alive
Content-Type: text/xml; charset=UTF-8

<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-
envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ws="org.scalaxbtest/WS" xmlns="org.scalaxbtest/
WS"><soap12:Body><test xmlns="org.scalaxbtest/WS"
xmlns:ws="org.scalaxbtest/WS" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/
XMLSchema"><person><name>joe</name><address><street>Bulevard</
street><city>Helsinki</city></address><children><child><name>Mary</
name><age>5</age><birthdate>2004-09-04T18:06:22Z</birthdate></
child><child><name>Mazy</name><age>3</age></child></children></
person></test></soap12:Body></soap12:Envelope>

see example soap1.1 vs soap1.2:
http://www.w3schools.com/webservices/tempconvert.asmx?op=FahrenheitToCelsius

The case objects are indeed well serialized to soap as you can see.

I tested also sending a real soap1.2 message with content-type
application/soap+xml to the MinimalSoapServer, but it refuses even
contenttype application/soap+xml. It only supports text/xml so it is
really a soap1.1-only server.

Greetings,
Dave

eugene yokota

unread,
Sep 1, 2011, 10:12:46 AM9/1/11
to sca...@googlegroups.com
If you're using 0.6.2 it should support SOAP 1.1 when there's no binding for SOAP 1.2.
I'll work on SOAP 1.2 content type.

-eugene

Dave

unread,
Sep 1, 2011, 1:06:27 PM9/1/11
to scalaxb
But if there are two bindings in the wsdl for soap1.1 and soap1.2 how
can I enforce from the client to use soap1.1?

Now I can do in my client:
val serviceSoap11 = (new WSTest11Bindings with SoapClients11 with
DispatchHttpClients11 {}).service
or
val serviceSoap12 = (new WSTest12Bindings with SoapClients12 with
DispatchHttpClients12 {}).service

Is that with the original 0.6.2 also possible and how?

Another problem I now have: how can I unmarshall from xml back to the
case class. My Person case class has arguments in its default
constructor. And because unmarshalling requires a no-argument default
constructor when extending a XmlAdapter with annotation
@XmlJavaTypeAdapter. Do you know of any solutions of these? I am
probably not the first.

wsdl with bindings for soap1.1 and soap1.2

wstest.wsdl
===========
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="org.scalaxbtest/WS"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsoap11="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/
soap12/"
targetNamespace="org.scalaxbtest/WS"
name="WSTest">
<wsdl:types>
<xs:schema version="1.0"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
<wsdl:binding name="WSTest11" type="tns:WSTest">
<wsoap11:binding transport="http://schemas.xmlsoap.org/soap/
http" style="document"></wsoap11:binding>
<wsdl:operation name="test">
<wsoap11:operation soapAction=""></wsoap11:operation>
<wsdl:input>
<wsoap11:body use="literal"></wsoap11:body>
</wsdl:input>
<wsdl:output>
<wsoap11:body use="literal"></wsoap11:body>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WSTest12" type="tns:WSTest">
<wsoap12:binding transport="http://www.w3.org/2003/05/soap/
bindings/HTTP/" style="document"></wsoap12:binding>
<wsdl:operation name="test">
<wsoap12:operation soapAction=""></wsoap12:operation>
<wsdl:input>
<wsoap12:body use="literal"></wsoap12:body>
</wsdl:input>
<wsdl:output>
<wsoap12:body use="literal"></wsoap12:body>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WSTest">
<wsdl:port name="WSTest11" binding="tns:WSTest11">
<wsoap11:address location="http://localhost:8080/wstest"></
wsoap11:address>
</wsdl:port>
<wsdl:port name="WSTest12" binding="tns:WSTest12">
<wsoap12:address location="http://localhost:8080/wstest"></
wsoap12:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>





> >http://www.w3schools.com/webservices/tempconvert.asmx?op=FahrenheitTo...
>
> > The case objects are indeed well serialized to soap as you can see.
>
> > I tested also sending a real soap1.2 message with content-type
> > application/soap+xml to the MinimalSoapServer, but it refuses even
> > contenttype application/soap+xml. It only supports text/xml so it is
> > really a soap1.1-only server.
>
> > Greetings,
> > Dave- Tekst uit oorspronkelijk bericht niet weergeven -

eugene yokota

unread,
Sep 1, 2011, 3:59:54 PM9/1/11
to sca...@googlegroups.com
Currently it can generate for either SOAP 1.1 or 1.2, and if 1.2 binding is found it'll pick 1.2.
I think there are some aspects of the generated interface that is actually dependent on a binding.

Also, I had not thought about using JAX unmarshaling to turn XML into case class, since I'd do scalaxb.fromXML.

-eugene

eugene yokota

unread,
Sep 5, 2011, 4:57:30 AM9/5/11
to sca...@googlegroups.com
Fixed the Content-Type header for SOAP 1.2: https://github.com/eed3si9n/scalaxb/issues/80

-eugene
Reply all
Reply to author
Forward
0 new messages