From: Stu B. <stu...@gm...> - 2008-11-25 23:08:03
|
I am trying a doc/literal example WSDL (see below). Everything seems fine except running the server instance (following instructions from Yaws documentation): 5> yaws_soap_srv:setup({hello_world, handler}, "/tmp/hello_world.wsdl"). ** exception exit: {noproc, {gen_server,call, [yaws_soap_srv, {add_wsdl, {hello_world,handler}, {wsdl, [{operation,"SOAPService1","SoapPort1", "greetMeOneWay","Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort1",[]}, {operation,"SOAPService2","SoapPort2", "greetMeOneWay","Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort2",[]}, {operation,"SOAPService3","SoapPort3", "greetMeOneWay","Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort3",[]}, {operation,"SOAPService1","SoapPort1","greetMe", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort1",[]}, {operation,"SOAPService2","SoapPort2","greetMe", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort2",[]}, {operation,"SOAPService3","SoapPort3","greetMe", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort3",[]}, {operation,"SOAPService1","SoapPort1","sayHi", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort1",[]}, {operation,"SOAPService2","SoapPort2","sayHi", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort2",[]}, {operation,"SOAPService3","SoapPort3","sayHi", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort3",[]}], {model, [{type,'_document',sequence, [{el, [{alt,'soap:Header','soap:Header',[],1,...}, {alt,'soap:Fault','soap:Fault',[],...}, {alt,'soap:Envelope','soap:Envelope',...}, {alt,'soap:Body',...}, {alt,...}, {...}|...], 1,1,1}], [],undefined,undefined,1,1,1,false,undefined}, {type,'p:faultDetail',sequence, [{el, [{alt,'p:minor',{'#PCDATA',...},[],...}], 1,1,1}, {el,[{alt,'p:major',{...},...}],1,1,2}], [],undefined,undefined,3,1,1,undefined,undefined}, {type,'p:greetMe',sequence, [{el,[{alt,'p:requestType',{...},...}],1,1,1}], [],undefined,undefined,2,1,1,undefined,...}, {type,'p:greetMeOneWay',sequence, [{el,[{alt,'p:requestType',...}],1,1,1}], [],undefined,undefined,2,1,1,...}, {type,'p:greetMeResponse',sequence, [{el,[{alt,...}],1,1,...}], [],undefined,undefined,2,1,...}, {type,'p:pingMe',sequence,[],[],undefined, undefined,1,...}, {type,'p:pingMeResponse',sequence,[],[],undefined, undefined,...}, {type,'p:sayHi',sequence,[],[],undefined,...}, {type,'p:sayHiResponse',sequence,[{...}],[],...}, {type,'soap:Body',sequence,[...],...}, {type,'soap:Envelope',sequence,...}, {type,'soap:Fault',...}, {type,...}, {...}], [{ns, "http://apache.org/hello_world_soap_http/types", "p"}, {ns,"http://schemas.xmlsoap.org/soap/envelope/", "soap"}, {ns,"http://www.w3.org/2001/XMLSchema","xsd"}], "http://schemas.xmlsoap.org/soap/envelope/",[]}, undefined}}, infinity]}} in function gen_server:call/3 ======= WSDL: ======= ]# cat /tmp/hello_world.wsdl <?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 name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/hello_world_soap_http" xmlns:x1="http://apache.org/hello_world_soap_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <schema targetNamespace="http://apache.org/hello_world_soap_http/types" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <element name="sayHi"> <complexType/> </element> <element name="sayHiResponse"> <complexType> <sequence> <element name="responseType" type="xsd:string"/> </sequence> </complexType> </element> <element name="greetMe"> <complexType> <sequence> <element name="requestType" type="xsd:string"/> </sequence> </complexType> </element> <element name="greetMeResponse"> <complexType> <sequence> <element name="responseType" type="xsd:string"/> </sequence> </complexType> </element> <element name="greetMeOneWay"> <complexType> <sequence> <element name="requestType" type="xsd:string"/> </sequence> </complexType> </element> <element name="pingMe"> <complexType/> </element> <element name="pingMeResponse"> <complexType/> </element> <element name="faultDetail"> <complexType> <sequence> <element name="minor" type="xsd:short"/> <element name="major" type="xsd:short"/> </sequence> </complexType> </element> </schema> </wsdl:types> <wsdl:message name="sayHiRequest"> <wsdl:part element="x1:sayHi" name="in"/> </wsdl:message> <wsdl:message name="sayHiResponse"> <wsdl:part element="x1:sayHiResponse" name="out"/> </wsdl:message> <wsdl:message name="greetMeRequest"> <wsdl:part element="x1:greetMe" name="in"/> </wsdl:message> <wsdl:message name="greetMeResponse"> <wsdl:part element="x1:greetMeResponse" name="out"/> </wsdl:message> <wsdl:message name="greetMeOneWayRequest"> <wsdl:part element="x1:greetMeOneWay" name="in"/> </wsdl:message> <wsdl:portType name="Greeter"> <wsdl:operation name="sayHi"> <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/> <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/> </wsdl:operation> <wsdl:operation name="greetMe"> <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/> <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/> </wsdl:operation> <wsdl:operation name="greetMeOneWay"> <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="sayHi"> <soap:operation soapAction="" style="document"/> <wsdl:input name="sayHiRequest"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="sayHiResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="greetMe"> <soap:operation soapAction="" style="document"/> <wsdl:input name="greetMeRequest"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="greetMeResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="greetMeOneWay"> <soap:operation soapAction="" style="document"/> <wsdl:input name="greetMeOneWayRequest"> <soap:body use="literal"/> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:service name="SOAPService1"> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort1"> <soap:address location="http://localhost:9000/SoapContext/SoapPort1"/> </wsdl:port> </wsdl:service> <wsdl:service name="SOAPService2"> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort2"> <soap:address location="http://localhost:9000/SoapContext/SoapPort2"/> </wsdl:port> </wsdl:service> <wsdl:service name="SOAPService3"> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort3"> <soap:address location="http://localhost:9000/SoapContext/SoapPort3"/> </wsdl:port> </wsdl:service> </wsdl:definitions> |
From: Willem de J. <w.a...@gm...> - 2008-11-26 07:32:06
|
Hi Stu, Like on the client side (see other mail), the issue here seems to be that some process needs to be started. It looks like the WSDL was processed correctly. I would need to know what you did before calling yaws_soap_srv... Regards, Willem On Wed, Nov 26, 2008 at 12:07 AM, Stu Bailey <stu...@gm...> wrote: > I am trying a doc/literal example WSDL (see below). Everything seems > fine except running the server instance (following instructions from > Yaws documentation): > > 5> yaws_soap_srv:setup({hello_world, handler}, "/tmp/hello_world.wsdl"). > ** exception exit: {noproc, > {gen_server,call, > [yaws_soap_srv, > {add_wsdl, > {hello_world,handler}, > {wsdl, > [{operation,"SOAPService1","SoapPort1", > "greetMeOneWay","Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort1",[]}, > {operation,"SOAPService2","SoapPort2", > "greetMeOneWay","Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort2",[]}, > {operation,"SOAPService3","SoapPort3", > "greetMeOneWay","Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort3",[]}, > {operation,"SOAPService1","SoapPort1","greetMe", > "Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort1",[]}, > {operation,"SOAPService2","SoapPort2","greetMe", > "Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort2",[]}, > {operation,"SOAPService3","SoapPort3","greetMe", > "Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort3",[]}, > {operation,"SOAPService1","SoapPort1","sayHi", > "Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort1",[]}, > {operation,"SOAPService2","SoapPort2","sayHi", > "Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort2",[]}, > {operation,"SOAPService3","SoapPort3","sayHi", > "Greeter_SOAPBinding", > "http://localhost:9000/SoapContext/SoapPort3",[]}], > {model, > [{type,'_document',sequence, > [{el, > [{alt,'soap:Header','soap:Header',[],1,...}, > {alt,'soap:Fault','soap:Fault',[],...}, > {alt,'soap:Envelope','soap:Envelope',...}, > {alt,'soap:Body',...}, > {alt,...}, > {...}|...], > 1,1,1}], > [],undefined,undefined,1,1,1,false,undefined}, > {type,'p:faultDetail',sequence, > [{el, > [{alt,'p:minor',{'#PCDATA',...},[],...}], > 1,1,1}, > {el,[{alt,'p:major',{...},...}],1,1,2}], > [],undefined,undefined,3,1,1,undefined,undefined}, > {type,'p:greetMe',sequence, > [{el,[{alt,'p:requestType',{...},...}],1,1,1}], > [],undefined,undefined,2,1,1,undefined,...}, > {type,'p:greetMeOneWay',sequence, > [{el,[{alt,'p:requestType',...}],1,1,1}], > [],undefined,undefined,2,1,1,...}, > {type,'p:greetMeResponse',sequence, > [{el,[{alt,...}],1,1,...}], > [],undefined,undefined,2,1,...}, > {type,'p:pingMe',sequence,[],[],undefined, > undefined,1,...}, > {type,'p:pingMeResponse',sequence,[],[],undefined, > undefined,...}, > {type,'p:sayHi',sequence,[],[],undefined,...}, > {type,'p:sayHiResponse',sequence,[{...}],[],...}, > {type,'soap:Body',sequence,[...],...}, > {type,'soap:Envelope',sequence,...}, > {type,'soap:Fault',...}, > {type,...}, > {...}], > [{ns, > "http://apache.org/hello_world_soap_http/types", > "p"}, > {ns,"http://schemas.xmlsoap.org/soap/envelope/", > "soap"}, > {ns,"http://www.w3.org/2001/XMLSchema","xsd"}], > "http://schemas.xmlsoap.org/soap/envelope/",[]}, > undefined}}, > infinity]}} > in function gen_server:call/3 > > > > ======= > WSDL: > ======= > > ]# cat /tmp/hello_world.wsdl > <?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 name="HelloWorld" > targetNamespace="http://apache.org/hello_world_soap_http" > xmlns="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:tns="http://apache.org/hello_world_soap_http" > xmlns:x1="http://apache.org/hello_world_soap_http/types" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <wsdl:types> > <schema targetNamespace="http://apache.org/hello_world_soap_http/types" > xmlns="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified"> > <element name="sayHi"> > <complexType/> > </element> > <element name="sayHiResponse"> > <complexType> > <sequence> > <element name="responseType" type="xsd:string"/> > </sequence> > </complexType> > </element> > <element name="greetMe"> > <complexType> > <sequence> > <element name="requestType" type="xsd:string"/> > </sequence> > </complexType> > </element> > <element name="greetMeResponse"> > <complexType> > <sequence> > <element name="responseType" type="xsd:string"/> > </sequence> > </complexType> > </element> > <element name="greetMeOneWay"> > <complexType> > <sequence> > <element name="requestType" type="xsd:string"/> > </sequence> > </complexType> > </element> > <element name="pingMe"> > <complexType/> > </element> > <element name="pingMeResponse"> > <complexType/> > </element> > <element name="faultDetail"> > <complexType> > <sequence> > <element name="minor" type="xsd:short"/> > <element name="major" type="xsd:short"/> > </sequence> > </complexType> > </element> > </schema> > </wsdl:types> > <wsdl:message name="sayHiRequest"> > <wsdl:part element="x1:sayHi" name="in"/> > </wsdl:message> > <wsdl:message name="sayHiResponse"> > <wsdl:part element="x1:sayHiResponse" name="out"/> > </wsdl:message> > <wsdl:message name="greetMeRequest"> > <wsdl:part element="x1:greetMe" name="in"/> > </wsdl:message> > <wsdl:message name="greetMeResponse"> > <wsdl:part element="x1:greetMeResponse" name="out"/> > </wsdl:message> > <wsdl:message name="greetMeOneWayRequest"> > <wsdl:part element="x1:greetMeOneWay" name="in"/> > </wsdl:message> > > <wsdl:portType name="Greeter"> > <wsdl:operation name="sayHi"> > <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/> > <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/> > </wsdl:operation> > > <wsdl:operation name="greetMe"> > <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/> > <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/> > </wsdl:operation> > > <wsdl:operation name="greetMeOneWay"> > <wsdl:input message="tns:greetMeOneWayRequest" > name="greetMeOneWayRequest"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > > <wsdl:operation name="sayHi"> > <soap:operation soapAction="" style="document"/> > <wsdl:input name="sayHiRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="sayHiResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > > <wsdl:operation name="greetMe"> > <soap:operation soapAction="" style="document"/> > <wsdl:input name="greetMeRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="greetMeResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > > <wsdl:operation name="greetMeOneWay"> > <soap:operation soapAction="" style="document"/> > <wsdl:input name="greetMeOneWayRequest"> > <soap:body use="literal"/> > </wsdl:input> > </wsdl:operation> > > </wsdl:binding> > > <wsdl:service name="SOAPService1"> > <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort1"> > <soap:address > location="http://localhost:9000/SoapContext/SoapPort1"/> > </wsdl:port> > </wsdl:service> > > <wsdl:service name="SOAPService2"> > <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort2"> > <soap:address > location="http://localhost:9000/SoapContext/SoapPort2"/> > </wsdl:port> > </wsdl:service> > > <wsdl:service name="SOAPService3"> > <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort3"> > <soap:address > location="http://localhost:9000/SoapContext/SoapPort3"/> > </wsdl:port> > </wsdl:service> > > </wsdl:definitions> > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > |
From: Stu B. <stu...@gm...> - 2008-11-26 16:05:26
|
Here is the full session: Eshell V5.6.5 (abort with ^G) 1> Docroot = "/tmp". "/tmp" 2> inets:start(). ok 3> GL = [{enable_soap,true}, % <== THIS WILL ENABLE SOAP IN A YAWS SERVER!! {trace, false}, {tmpdir,"/tmp"},{logdir,"/tmp"}, {flags,[{auth_log,false},{tty_trace, false},{copy_errlog, true}]}]. [{enable_soap,true}, {trace,false}, {tmpdir,"/tmp"}, {logdir,"/tmp"}, {flags,[{auth_log,false}, {tty_trace,false}, {copy_errlog,true}]}] 4> SL = [{port,9000},{servername,"localhost"},{dir_listings, true}, {listen,{127,0,0,1}},{flags,[{access_log,false}]}]. [{port,9000}, {servername,"metis"}, {dir_listings,true}, {listen,{127,0,0,1}}, {flags,[{access_log,false}]}] 5> code:add_path("/tmp"). true 6> yaws_soap_srv:setup({hello_world, handler}, "file:///tmp/hello_world.wsdl"). ** exception exit: {noproc, {gen_server,call, [yaws_soap_srv, {add_wsdl, {hello_world,handler}, {wsdl, [{operation,"SOAPService1","SoapPort1", "greetMeOneWay","Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort1",[]}, {operation,"SOAPService2","SoapPort2", "greetMeOneWay","Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort2",[]}, {operation,"SOAPService3","SoapPort3", "greetMeOneWay","Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort3",[]}, {operation,"SOAPService1","SoapPort1","greetMe", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort1",[]}, {operation,"SOAPService2","SoapPort2","greetMe", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort2",[]}, {operation,"SOAPService3","SoapPort3","greetMe", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort3",[]}, {operation,"SOAPService1","SoapPort1","sayHi", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort1",[]}, {operation,"SOAPService2","SoapPort2","sayHi", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort2",[]}, {operation,"SOAPService3","SoapPort3","sayHi", "Greeter_SOAPBinding", "http://localhost:9000/SoapContext/SoapPort3",[]}], {model, [{type,'_document',sequence, [{el, [{alt,'soap:Header','soap:Header',[],1,...}, {alt,'soap:Fault','soap:Fault',[],...}, {alt,'soap:Envelope','soap:Envelope',...}, {alt,'soap:Body',...}, {alt,...}, {...}|...], 1,1,1}], [],undefined,undefined,1,1,1,false,undefined}, {type,'p:faultDetail',sequence, [{el, [{alt,'p:minor',{'#PCDATA',...},[],...}], 1,1,1}, {el,[{alt,'p:major',{...},...}],1,1,2}], [],undefined,undefined,3,1,1,undefined,undefined}, {type,'p:greetMe',sequence, [{el,[{alt,'p:requestType',{...},...}],1,1,1}], [],undefined,undefined,2,1,1,undefined,...}, {type,'p:greetMeOneWay',sequence, [{el,[{alt,'p:requestType',...}],1,1,1}], [],undefined,undefined,2,1,1,...}, {type,'p:greetMeResponse',sequence, [{el,[{alt,...}],1,1,...}], [],undefined,undefined,2,1,...}, {type,'p:pingMe',sequence,[],[],undefined, undefined,1,...}, {type,'p:pingMeResponse',sequence,[],[],undefined, undefined,...}, {type,'p:sayHi',sequence,[],[],undefined,...}, {type,'p:sayHiResponse',sequence,[{...}],[],...}, {type,'soap:Body',sequence,[...],...}, {type,'soap:Envelope',sequence,...}, {type,'soap:Fault',...}, {type,...}, {...}], [{ns, "http://apache.org/hello_world_soap_http/types", "p"}, {ns,"http://schemas.xmlsoap.org/soap/envelope/", "soap"}, {ns,"http://www.w3.org/2001/XMLSchema","xsd"}], "http://schemas.xmlsoap.org/soap/envelope/",[]}, undefined}}, infinity]}} in function gen_server:call/3 7> On Tue, Nov 25, 2008 at 11:31 PM, Willem de Jong <w.a...@gm...> wrote: > Hi Stu, > > Like on the client side (see other mail), the issue here seems to be > that some process needs to be started. It looks like the WSDL was > processed correctly. I would need to know what you did before calling > yaws_soap_srv... > > Regards, > Willem > > On Wed, Nov 26, 2008 at 12:07 AM, Stu Bailey <stu...@gm...> wrote: >> I am trying a doc/literal example WSDL (see below). Everything seems >> fine except running the server instance (following instructions from >> Yaws documentation): >> >> 5> yaws_soap_srv:setup({hello_world, handler}, "/tmp/hello_world.wsdl"). >> ** exception exit: {noproc, >> {gen_server,call, >> [yaws_soap_srv, >> {add_wsdl, >> {hello_world,handler}, >> {wsdl, >> [{operation,"SOAPService1","SoapPort1", >> "greetMeOneWay","Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort1",[]}, >> {operation,"SOAPService2","SoapPort2", >> "greetMeOneWay","Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort2",[]}, >> {operation,"SOAPService3","SoapPort3", >> "greetMeOneWay","Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort3",[]}, >> {operation,"SOAPService1","SoapPort1","greetMe", >> "Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort1",[]}, >> {operation,"SOAPService2","SoapPort2","greetMe", >> "Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort2",[]}, >> {operation,"SOAPService3","SoapPort3","greetMe", >> "Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort3",[]}, >> {operation,"SOAPService1","SoapPort1","sayHi", >> "Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort1",[]}, >> {operation,"SOAPService2","SoapPort2","sayHi", >> "Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort2",[]}, >> {operation,"SOAPService3","SoapPort3","sayHi", >> "Greeter_SOAPBinding", >> "http://localhost:9000/SoapContext/SoapPort3",[]}], >> {model, >> [{type,'_document',sequence, >> [{el, >> [{alt,'soap:Header','soap:Header',[],1,...}, >> {alt,'soap:Fault','soap:Fault',[],...}, >> {alt,'soap:Envelope','soap:Envelope',...}, >> {alt,'soap:Body',...}, >> {alt,...}, >> {...}|...], >> 1,1,1}], >> [],undefined,undefined,1,1,1,false,undefined}, >> {type,'p:faultDetail',sequence, >> [{el, >> [{alt,'p:minor',{'#PCDATA',...},[],...}], >> 1,1,1}, >> {el,[{alt,'p:major',{...},...}],1,1,2}], >> [],undefined,undefined,3,1,1,undefined,undefined}, >> {type,'p:greetMe',sequence, >> [{el,[{alt,'p:requestType',{...},...}],1,1,1}], >> [],undefined,undefined,2,1,1,undefined,...}, >> {type,'p:greetMeOneWay',sequence, >> [{el,[{alt,'p:requestType',...}],1,1,1}], >> [],undefined,undefined,2,1,1,...}, >> {type,'p:greetMeResponse',sequence, >> [{el,[{alt,...}],1,1,...}], >> [],undefined,undefined,2,1,...}, >> {type,'p:pingMe',sequence,[],[],undefined, >> undefined,1,...}, >> {type,'p:pingMeResponse',sequence,[],[],undefined, >> undefined,...}, >> {type,'p:sayHi',sequence,[],[],undefined,...}, >> {type,'p:sayHiResponse',sequence,[{...}],[],...}, >> {type,'soap:Body',sequence,[...],...}, >> {type,'soap:Envelope',sequence,...}, >> {type,'soap:Fault',...}, >> {type,...}, >> {...}], >> [{ns, >> "http://apache.org/hello_world_soap_http/types", >> "p"}, >> {ns,"http://schemas.xmlsoap.org/soap/envelope/", >> "soap"}, >> {ns,"http://www.w3.org/2001/XMLSchema","xsd"}], >> "http://schemas.xmlsoap.org/soap/envelope/",[]}, >> undefined}}, >> infinity]}} >> in function gen_server:call/3 >> >> >> >> ======= >> WSDL: >> ======= >> >> ]# cat /tmp/hello_world.wsdl >> <?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 name="HelloWorld" >> targetNamespace="http://apache.org/hello_world_soap_http" >> xmlns="http://schemas.xmlsoap.org/wsdl/" >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >> xmlns:tns="http://apache.org/hello_world_soap_http" >> xmlns:x1="http://apache.org/hello_world_soap_http/types" >> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >> <wsdl:types> >> <schema targetNamespace="http://apache.org/hello_world_soap_http/types" >> xmlns="http://www.w3.org/2001/XMLSchema" >> elementFormDefault="qualified"> >> <element name="sayHi"> >> <complexType/> >> </element> >> <element name="sayHiResponse"> >> <complexType> >> <sequence> >> <element name="responseType" type="xsd:string"/> >> </sequence> >> </complexType> >> </element> >> <element name="greetMe"> >> <complexType> >> <sequence> >> <element name="requestType" type="xsd:string"/> >> </sequence> >> </complexType> >> </element> >> <element name="greetMeResponse"> >> <complexType> >> <sequence> >> <element name="responseType" type="xsd:string"/> >> </sequence> >> </complexType> >> </element> >> <element name="greetMeOneWay"> >> <complexType> >> <sequence> >> <element name="requestType" type="xsd:string"/> >> </sequence> >> </complexType> >> </element> >> <element name="pingMe"> >> <complexType/> >> </element> >> <element name="pingMeResponse"> >> <complexType/> >> </element> >> <element name="faultDetail"> >> <complexType> >> <sequence> >> <element name="minor" type="xsd:short"/> >> <element name="major" type="xsd:short"/> >> </sequence> >> </complexType> >> </element> >> </schema> >> </wsdl:types> >> <wsdl:message name="sayHiRequest"> >> <wsdl:part element="x1:sayHi" name="in"/> >> </wsdl:message> >> <wsdl:message name="sayHiResponse"> >> <wsdl:part element="x1:sayHiResponse" name="out"/> >> </wsdl:message> >> <wsdl:message name="greetMeRequest"> >> <wsdl:part element="x1:greetMe" name="in"/> >> </wsdl:message> >> <wsdl:message name="greetMeResponse"> >> <wsdl:part element="x1:greetMeResponse" name="out"/> >> </wsdl:message> >> <wsdl:message name="greetMeOneWayRequest"> >> <wsdl:part element="x1:greetMeOneWay" name="in"/> >> </wsdl:message> >> >> <wsdl:portType name="Greeter"> >> <wsdl:operation name="sayHi"> >> <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/> >> <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/> >> </wsdl:operation> >> >> <wsdl:operation name="greetMe"> >> <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/> >> <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/> >> </wsdl:operation> >> >> <wsdl:operation name="greetMeOneWay"> >> <wsdl:input message="tns:greetMeOneWayRequest" >> name="greetMeOneWayRequest"/> >> </wsdl:operation> >> </wsdl:portType> >> <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> >> <soap:binding style="document" >> transport="http://schemas.xmlsoap.org/soap/http"/> >> >> <wsdl:operation name="sayHi"> >> <soap:operation soapAction="" style="document"/> >> <wsdl:input name="sayHiRequest"> >> <soap:body use="literal"/> >> </wsdl:input> >> <wsdl:output name="sayHiResponse"> >> <soap:body use="literal"/> >> </wsdl:output> >> </wsdl:operation> >> >> <wsdl:operation name="greetMe"> >> <soap:operation soapAction="" style="document"/> >> <wsdl:input name="greetMeRequest"> >> <soap:body use="literal"/> >> </wsdl:input> >> <wsdl:output name="greetMeResponse"> >> <soap:body use="literal"/> >> </wsdl:output> >> </wsdl:operation> >> >> <wsdl:operation name="greetMeOneWay"> >> <soap:operation soapAction="" style="document"/> >> <wsdl:input name="greetMeOneWayRequest"> >> <soap:body use="literal"/> >> </wsdl:input> >> </wsdl:operation> >> >> </wsdl:binding> >> >> <wsdl:service name="SOAPService1"> >> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort1"> >> <soap:address >> location="http://localhost:9000/SoapContext/SoapPort1"/> >> </wsdl:port> >> </wsdl:service> >> >> <wsdl:service name="SOAPService2"> >> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort2"> >> <soap:address >> location="http://localhost:9000/SoapContext/SoapPort2"/> >> </wsdl:port> >> </wsdl:service> >> >> <wsdl:service name="SOAPService3"> >> <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort3"> >> <soap:address >> location="http://localhost:9000/SoapContext/SoapPort3"/> >> </wsdl:port> >> </wsdl:service> >> >> </wsdl:definitions> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Erlyaws-list mailing list >> Erl...@li... >> https://lists.sourceforge.net/lists/listinfo/erlyaws-list >> > |
From: Claes W. <kl...@ta...> - 2008-11-26 16:19:18
|
Stu Bailey wrote: > The soap code isn't documented together with embedded mode. However. > true > 6> yaws_soap_srv:setup({hello_world, handler}, "file:///tmp/hello_world.wsdl"). > ** exception exit: {noproc, > {gen_server,call, Sureley indicates that a gen_server isn't started. Further, taking a look at the code for yaws:start_embedded/4 I find a call to yaws_config:add_yaws_soap_srv(GC), which has Spec = {yaws_soap_srv, {yaws_soap_srv, start_link, []}, permanent, 5000, worker, [yaws_soap_srv]}, spawn(fun() -> supervisor:start_child(yaws_sup, Spec) end); /klacke |
From: Stu B. <stu...@gm...> - 2008-11-26 16:52:13
|
Thanks for the pointers. I'll do some reading, and try again. Stu On Wed, Nov 26, 2008 at 8:19 AM, Claes Wikstrom <kl...@ta...> wrote: > Stu Bailey wrote: >> > > The soap code isn't documented together > with embedded mode. However. > >> true >> 6> yaws_soap_srv:setup({hello_world, handler}, >> "file:///tmp/hello_world.wsdl"). >> ** exception exit: {noproc, >> {gen_server,call, > > Sureley indicates that a gen_server isn't started. Further, taking a look > at the code for yaws:start_embedded/4 I find a call to > > yaws_config:add_yaws_soap_srv(GC), > > which has > > Spec = {yaws_soap_srv, {yaws_soap_srv, start_link, []}, > permanent, 5000, worker, [yaws_soap_srv]}, > spawn(fun() -> supervisor:start_child(yaws_sup, Spec) end); > > > /klacke > > |
From: Stu B. <stu...@gm...> - 2008-11-26 18:32:31
|
OK, things look much better; it looks like I'm close to getting it working. I'll keep reading but if anything below looks obvious, please let me know: Eshell V5.6.5 (abort with ^G) 1> Docroot = "/tmp". "/tmp" 2> GL = [{enable_soap,true}, % <== THIS WILL ENABLE SOAP IN A YAWS SERVER!! {trace, false}, {tmpdir,"/tmp"},{logdir,"/tmp"}, {flags,[{auth_log,false},{tty_trace, false},{copy_errlog, true}]}]. [{enable_soap,true}, {trace,false}, {tmpdir,"/tmp"}, {logdir,"/tmp"}, {flags,[{auth_log,false}, {tty_trace,false}, {copy_errlog,true}]}] 3> SL = [{port,9000},{servername,"localhost"},{dir_listings, true}, {listen,{127,0,0,1}},{flags,[{access_log,false}]}]. [{port,9000}, {servername,"localhost"}, {dir_listings,true}, {listen,{127,0,0,1}}, {flags,[{access_log,false}]}] 4> code:add_path("/tmp"). true 5> yaws:start_embedded("/tmp", SL, GL). =INFO REPORT==== 26-Nov-2008::10:26:56 === Yaws: Listening to 127.0.0.1:9000 for servers - http://metis:9000 under /tmp ok 6> yaws_soap_srv:setup({hello_world, handler}, "file:///tmp/hello_world.wsdl"). ok 7> inets:start(). ok 8> yaws_soap_lib:call("file:///tmp/hello_world.wsdl", "greetMe", ["Stu"]). =INFO REPORT==== 26-Nov-2008::10:29:05 === Invalid option {http_timeout,20000} ignored {error,{decoding,[{exception,{error,"unknown tag: HTML"}}, {stack,[undefined]}, {received,{startElement,[],"HTML",[],[]}}]}} |
From: Willem de J. <w.a...@gm...> - 2008-11-26 21:06:21
|
hi, possibly yaws is sending you an error message because your soap serverside code failed somehow. if i remember correctly i made the mistake several times to forget that the response that is encoded has to be a list, not just a single record - but it may be anything, of course. good luck, willem On 11/26/08, Stu Bailey <stu...@gm...> wrote: > OK, things look much better; it looks like I'm close to getting it > working. I'll keep reading but if anything below looks obvious, please > let me know: > > Eshell V5.6.5 (abort with ^G) > 1> Docroot = "/tmp". > "/tmp" > 2> GL = [{enable_soap,true}, % <== THIS WILL ENABLE SOAP IN A YAWS > SERVER!! > {trace, false}, > {tmpdir,"/tmp"},{logdir,"/tmp"}, > {flags,[{auth_log,false},{tty_trace, false},{copy_errlog, true}]}]. > [{enable_soap,true}, > {trace,false}, > {tmpdir,"/tmp"}, > {logdir,"/tmp"}, > {flags,[{auth_log,false}, > {tty_trace,false}, > {copy_errlog,true}]}] > 3> SL = [{port,9000},{servername,"localhost"},{dir_listings, true}, > {listen,{127,0,0,1}},{flags,[{access_log,false}]}]. > [{port,9000}, > {servername,"localhost"}, > {dir_listings,true}, > {listen,{127,0,0,1}}, > {flags,[{access_log,false}]}] > 4> code:add_path("/tmp"). > true > 5> yaws:start_embedded("/tmp", > SL, > GL). > > =INFO REPORT==== 26-Nov-2008::10:26:56 === > Yaws: Listening to 127.0.0.1:9000 for servers > - http://metis:9000 under /tmp > ok > 6> yaws_soap_srv:setup({hello_world, handler}, > "file:///tmp/hello_world.wsdl"). > ok > 7> inets:start(). > ok > 8> yaws_soap_lib:call("file:///tmp/hello_world.wsdl", > "greetMe", > ["Stu"]). > > =INFO REPORT==== 26-Nov-2008::10:29:05 === > Invalid option {http_timeout,20000} ignored > > {error,{decoding,[{exception,{error,"unknown tag: HTML"}}, > {stack,[undefined]}, > {received,{startElement,[],"HTML",[],[]}}]}} > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > |
From: Stu B. <stu...@gm...> - 2008-11-27 04:11:51
|
OK, I got a HelloWorld example working! Thanks for all the help! Stu On Wed, Nov 26, 2008 at 1:06 PM, Willem de Jong <w.a...@gm...> wrote: > hi, > > possibly yaws is sending you an error message because your soap > serverside code failed somehow. if i remember correctly i made the > mistake several times to forget that the response that is encoded has > to be a list, not just a single record - but it may be anything, of > course. > > good luck, > willem > > On 11/26/08, Stu Bailey <stu...@gm...> wrote: >> OK, things look much better; it looks like I'm close to getting it >> working. I'll keep reading but if anything below looks obvious, please >> let me know: >> >> Eshell V5.6.5 (abort with ^G) >> 1> Docroot = "/tmp". >> "/tmp" >> 2> GL = [{enable_soap,true}, % <== THIS WILL ENABLE SOAP IN A YAWS >> SERVER!! >> {trace, false}, >> {tmpdir,"/tmp"},{logdir,"/tmp"}, >> {flags,[{auth_log,false},{tty_trace, false},{copy_errlog, true}]}]. >> [{enable_soap,true}, >> {trace,false}, >> {tmpdir,"/tmp"}, >> {logdir,"/tmp"}, >> {flags,[{auth_log,false}, >> {tty_trace,false}, >> {copy_errlog,true}]}] >> 3> SL = [{port,9000},{servername,"localhost"},{dir_listings, true}, >> {listen,{127,0,0,1}},{flags,[{access_log,false}]}]. >> [{port,9000}, >> {servername,"localhost"}, >> {dir_listings,true}, >> {listen,{127,0,0,1}}, >> {flags,[{access_log,false}]}] >> 4> code:add_path("/tmp"). >> true >> 5> yaws:start_embedded("/tmp", >> SL, >> GL). >> >> =INFO REPORT==== 26-Nov-2008::10:26:56 === >> Yaws: Listening to 127.0.0.1:9000 for servers >> - http://metis:9000 under /tmp >> ok >> 6> yaws_soap_srv:setup({hello_world, handler}, >> "file:///tmp/hello_world.wsdl"). >> ok >> 7> inets:start(). >> ok >> 8> yaws_soap_lib:call("file:///tmp/hello_world.wsdl", >> "greetMe", >> ["Stu"]). >> >> =INFO REPORT==== 26-Nov-2008::10:29:05 === >> Invalid option {http_timeout,20000} ignored >> >> {error,{decoding,[{exception,{error,"unknown tag: HTML"}}, >> {stack,[undefined]}, >> {received,{startElement,[],"HTML",[],[]}}]}} >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Erlyaws-list mailing list >> Erl...@li... >> https://lists.sourceforge.net/lists/listinfo/erlyaws-list >> > |