Re: Problems exposing a webservice

Posted by David Georg Reichelt on
URL: https://discuss.orbeon.com/Problems-exposing-a-webservice-tp1475554p1568951.html

Hi,

Yeah, I assume that the problem isn't the exposing of the webservice but
the call, but I'm not shure. I uploaded a minimal example on
www.the-fight-online.de/servicetest.zip. There are to files in the zip
directory, one exposing the service (in the directory service) and one
trying to use the service (in the directory servicecall). If those two
are in resources/apps, the service seems to work (a call in a browser
returns a xml-file with the request-data), but the call with some test
data just returns null-data. Normaly, it should return the things I've
sent (i changed it, now it contains just the identity-processor..). Can
you tell me what I'm doing wrong?

Best Regards,
David

Alessandro Vernet schrieb:

> David,
>
> What you do in http://nopaste.info/2864e06b28.html to implement a
> service looks OK to me, so it is hard to say why it is not working for
> you. Would you be able to create a minimal example, maybe an "app"
> that we can put under resources/apps that would show the problem you
> are hitting?
>
> Alex
>
> On Mon, Feb 22, 2010 at 3:54 AM, David Georg Reichelt
> <[hidden email]> wrote:
>  
>> Hi Steve,
>>
>> Thanks for your advices.
>> I thought, the url-generator would do something that is important for
>> handling the input, but he is just a example-thing you can do with input. I
>> now have inserted the Java-Processor I would like to expose, and the code
>> now looks like this: http://nopaste.info/2864e06b28.html At least, when I
>> call it from browser, it shows the output of the Java-Processor without
>> input.
>>
>> Now I am trying to use the Webservice. Unfortunately, the traffic example
>> doesn't work, and the examples from
>> http://www.orbeon.com/orbeon/doc/processors-delegation doesn't, either. The
>> RPC-Example returns just null, and the other one returns an error. I tried
>> to let both use my localhost-service, but the first just returned null.
>> (example: http://nopaste.info/8b4904a5ef.html)
>>
>> I simply want - in the Service - expose an Java Program, that receives
>> input, and then to use this Service with a given input from another service.
>> Can you give me a hint, how to configure the exposing or the using, to get
>> this aim?
>>
>> Thanks,
>> David
>>
>> Steve Bayliss schrieb:
>>    
>>> Hi David
>>>
>>> What's the purpose of the oxf:url-generator in your example pipelines?
>>>
>>> You seem to be generating the config input of the url-generator from the
>>> request body - so if you call it from the browser then I wouldn't expect
>>> the
>>> request body to contain a URL (the body would be empty), so that would
>>> explain the error.
>>>
>>> You might try adding a debug attribute to your url-generator config input,
>>> this will show the config input that the url-generator is using.  You
>>> might
>>> also try adding a debug attribute on the output of your request generator
>>> so
>>> you can see the raw request data.
>>>
>>> >From your examples it looks like you are expecting your web service to
>>> receive a URL in the request body - is that correct?
>>>
>>> Also, do you need to implement your web service as a SOAP service?  Or
>>> would
>>> a simple web service that receives and XML document POST-ed to it do the
>>> job?  If you don't need it to be a SOAP service it will be simpler to
>>> implement.
>>>
>>> One more point - you've used xml-serializer to provide the output,
>>> although
>>> this does follow the Orbeon examples it's now recommended to use a xml
>>> converter followed by the HTTP serializer to do this job.
>>>
>>> Regards
>>> Steve
>>>
>>>
>>> -----Original Message-----
>>> From: David Georg Reichelt [mailto:[hidden email]] Sent: 10
>>> February 2010 09:49
>>> To: [hidden email]
>>> Subject: [ops-users] Problems exposing a webservice
>>>
>>>
>>> Hi,
>>>
>>> I am new to Orbeon Forms and currently trying to expose a webservice that
>>> is running an XPL-Pipeline. I already have implemented the Pipeline with
>>> Input from an XHTML-File, but now I want to run it as a Webservice. I read
>>> the help about exposing webservices (
>>> http://www.orbeon.com/orbeon/doc/integration-webservices#d6e69 ) and tryied
>>> to just copy-paste the code. I thought that for the beginning it would be
>>> enough to just give back everything that is sent to the webservice with code
>>> like this: http://nopaste.info/abd8268692.html To test, weather the service
>>> is working, I just used the consuming webservice example described at the
>>> Orbeon Forms page. The traffic-Service of this example isn't working, too,
>>> because the server isn't online, so I changed it like this:
>>> http://nopaste.info/23e3e853db.html to test this webservice:
>>> http://soapclient.com/edgar.html.
>>> Unfortunately this isn't working at all, so it isn't returning anything
>>> but null. Because of this, I am unable to find out weather my webservice is
>>> working or not. If I just call it from browser, it says "URL generator found
>>> null URL for config: <config><url/></config>". I searched the old
>>> mailinglistentrys, but the only thing I found was
>>> http://n4.nabble.com/exposing-webservices-td26538.html#a26538, I configured
>>> it to run with idendity processor (like this:
>>> http://nopaste.info/58bb0f3a82.html), but it's just saying "URL generator
>>> found null URL for config: <config><url/></config>" when I call it from
>>> browser.
>>> Can anyone tell me how to make a working call of a webservice, that is
>>> exposed in Orbeon forms or what I'm making wrong to archieve that?
>>>
>>> Thanks,
>>> David
>>>
>>>
>>>      
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>>    
>
>
>
>  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws