Web Service [JSP/Java]

Newsgator Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Web Service [JSP/Java] Expand / Collapse
Author
Message
Posted 11/25/2005 2:53:26 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/20/2005 8:23:00 AM
Posts: 6, Visits: 1
Hi,

Kamayo is looking to create a newsgator services. For many reaseons we need to use JSP, is the API disponible in java ?

I don't understand how we can download it / get a documentation about it.

Also I am pretty much a new developper and know nothing about SOAP, RSS, anything around newsgator, is there a basic HOWTO or something to understand ? .

Alexis

edit: my bad I just see that your API is a web service, so it's operable from JAVA.

Sorry for being a newbie.

2nd edit : Do you have an WSDL file so I can use it to generate the client function ?
Post #9850
Posted 11/25/2005 9:46:18 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/20/2005 8:23:00 AM
Posts: 6, Visits: 1
Hi,

I used your Wsdl file to generate with WSDL2java and I don't know what to do then. It create me ArrayOfLocation, Location, 2 interfaces and LocationWebServiceSoapStub and LocationWebServiceLocator.

I don't know what to do then.

Help me please .

Alexis
Post #9851
Posted 11/28/2005 3:18:25 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/20/2005 8:23:00 AM
Posts: 6, Visits: 1
Hi,

Today I'm starting to look again to understand how sending my Token using the generated class from your WSDL file. I have the class ready but I don't know how to add my token key to the soap:Header. I think it's weird since your WSDL talks a lot about NGAToken and not my generated classes !

I used WSDL2java and axis and eclipse pluging to do it.

It generate me classes and interfaces. I added the password and username in the stub but I don't see where adding the token. Will I have to do it manually constructing the soapHeader in java ?

I don't know I am pretty lost.




SOAPHeaderElement NGAToken = new SOAPHeaderElement(new
PrefixedQName("http://services.newsgator.com/svc/Location.asmx", "NGAPIToken", "GetLocations"));
MessageElement Token = new MessageElement("","Token");
try {
Token.setObjectValue("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

NGAToken.addChild(Token);
}
catch (java.lang.Throwable t) {
throw new org.apache.axis.AxisFault ("Caught exception, while adding Token header.", t);
}
_call.addHeader(NGAToken);

I added this so it add my token to header.

Alexis

edit: ok I got it all working and sorted, I am now starting my application.

if anyone need helps for java, contact me on my mail : alexis.torres@kamayo.com.
Post #9882
Posted 11/28/2005 12:59:47 PM
Rockstar

Rockstar

Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 173, Visits: 19
Hi Alexis,

Sorry I didn't get back to you earlier, I wasn't checking the forums much over the holiday weekend. I'm glad to hear you got it working though. Which SOAP stack are you using to do this? The specific technique would vary based upon the SOAP implementation.
Post #9891
Posted 12/1/2005 4:04:32 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/20/2005 8:23:00 AM
Posts: 6, Visits: 1
Hi Gordon,

I managed to get the first web service working ( locations ). I don't plan on using folders .

I don't know what a SOAP stack is. I am using Axis 1.2RC2 and WSDL2java to get the connexion routine to your web application generated so I just have to do getlocations to get the locations.

I have trouble using subscriptions, getSuscriptionsArray return me and XmlElement ( and exactly something called opml ) and I don't know how to use it. I though It would just return a list of urls or feed or something like this but it seem that it return me opml. Now I am looking around the generated code to see if it generated a wrapper function to get those url list without having to write ompl interpretor.

Maybe I went to far in the generated code and use an internal method. I'll check this and maybe make an howto to get your API calls in java using code generation method.

Thanks.

Alexis
Post #9977
Posted 12/1/2005 10:44:06 AM
Rockstar

Rockstar

Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 173, Visits: 19
OK, so Axis is your "SOAP stack". For GetSubscriptionList returns OPML intentionally, because most existing RSS consumers already understand it. I didn't strong type the interface, which was a mistake. What I would probably do in your case is use the schemas at http://www.newsgator.com/schema/services/ngopml.xsd to create an XML - Object mapping and then serialize the XmlElement into those objects.
Post #9986
Posted 12/5/2005 6:39:12 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/20/2005 8:23:00 AM
Posts: 6, Visits: 1
I don't know what an "existing RSS consumers" is but I think I am making one for mobile phone. Maybe I will have to write opml to java part but this is not hard with digester or DOM.

Alexis
Post #10015
« Prev Topic | Next Topic »


All times are GMT -7:00, Time now is 7:53am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 9 queries. Compression Disabled.

NewsGator.com | Support | Developers | Partners | Press | Company
© Copyright 2003-2008  NewsGator Technologies, Inc. All Rights Reserved.
Copyright Information | Privacy Policy | Terms of Service
Microsoft Gold Certified Partner