- Message Board
- Start New Topic
- Group Members
|
Hello all,
I've just completed the following code in Java: TestApiImpl t = new TestApiImpl(); TestResponse tr = t.echo("Hello World"); System.out.print(tr.getMessage()); and I obtained the following Exception: Exception in thread "main" org.codehaus.xfire.annotations.AnnotationException: Port name can't be defined on interface. JSR181 spec : 4.1.1. Class : com.hi5.api.client.TestApi Does anybody knows what this exception means? I have all the libraries needed imported. Regards, Nuno Posted by Moreno Rodrigues
|
Jan 4, 2008 4:05 AM |
|
hi nuno - still having any problems? not sure what this would have been from.
Posted by Lou Moore
|
Jan 25, 2008 6:47 PM |
|
Yes i am... I simply can't use your Java API... It is always throwing exceptions... Are you using Java 6? Can't you provide some java sample code? A simpe call to the echo function would be great...
Posted by Moreno Rodrigues
|
Jan 26, 2008 9:52 AM |
|
You probably don't have the correct classpath..
Here's a quick example with the latest enunciate 1.6 java -cp .:hi5-client.jar:enunciate-xfire-client-tools-1.6.jar:xfire-all-1.2.2.jar:xfire-jsr181-api-1.0-M1.jar:stax-api-1.0.1.jar:wsdl4j-1.5.2.jar:wstx-asl-2.9.3.jar:commons-codec-1.3.jar:commons-httpclient-3.0.jar:jdom-1.0.jar:mail-1.4.jar:activation-1.1.jar:commons-logging-1.0.4.jar foo Assuming you have foo.java import com.hi5.api.client.impl.TestApiImpl; import com.hi5.api.client.data.TestResponse; class foo { public static void main(String args[]) throws java.io.IOException { TestApiImpl t = new TestApiImpl(); TestResponse tr = t.echo("Hello World"); System.out.print(tr.getMessage()); } } This is with Java 1.6.. Posted by Paul Lindner
|
Jan 28, 2008 5:10 AM |
|
Hi,
I try the same example with TestApiImpl and echo, I use all the needed jar files and if I run the application I get following output: 05.03.2008 16:15:19 org.apache.commons.httpclient.HttpMethodBase writeRequest INFO: 100 (continue) read timeout. Resume sending the request Do you have some suggestions/solutions for this problem? Posted by Bobby
|
Mar 5, 2008 6:19 AM |
|
Hi Moreno,
I have the same problem. Have you found a solution? Regards Marcin Posted by Marcin Sokolowski
|
Apr 9, 2008 4:37 AM |
|
Try using xfire-1.2.2. I had this problem while using xfire-1.2.6.
Posted by Marcin Sokolowski
|
Apr 10, 2008 2:11 AM |
|
echo test is done correctly.
but what means auth? I do: ..... httpHeaders.put("Cookies", "Hi5AuthToken=" + Utils.ue(authToken) + "; " + "expires=" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(new Date().getTime() + 2000000))); ...... TestApiImpl tai = new TestApiImpl(); tai.setHttpHeaders(httpHeaders); TestResponse tr = tai.echo("Hello World"); log.info("ms : " + tr.getMessage()); TestResponse ar = tai.auth("My World"); log.info("ar : " + ar.getMessage()); and get an exception: 27.05.2008 14:21:43 ERROR [org.apache.catalina.core.StandardWrapperValve] Servlet.service() for servlet action threw exception org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Fault: java.lang.reflect.UndeclaredThrowableException .... at com.hi5.api.client.impl.TestApiImpl.auth(TestApiImpl.java:62) authToken and apiKey are fresh and correct. Anybody use SOAP? Posted by Victor Melnik
|
Apr 19, 2008 4:26 AM |
|
And one more faild test
AuthApiImpl authImpl = new AuthApiImpl(); authImpl.setHttpHeaders(httpHeaders); try { log.info("tokenObj"); AuthToken token = authImpl.auth_decodetoken(authToken); log.info("tokenObj ok"); return token.getUserId().longValue(); } catch (PermissionDeniedException e) { throw new SocialNetworkClientException(e.getMessage()); } I got Permission denied. Why? I try also from this url http://api.hi5.com/soap_ns2_AuthApiService.html#auth_plain and also got 403 type Status report message - No such user description - Access to the specified resource (No such user) has been forbidden. Why? Maybe app should be publiched? I run it from devhome? Posted by Victor Melnik
|
Apr 19, 2008 4:32 AM |
|
Look! I try to pass through your authentication.
AuthApi aa = new AuthApiImpl(); AuthToken t = aa.auth_plain("a9903_7d536a476996c57ed9fd5", " Posted by Roman Mazur
|
Apr 21, 2008 12:12 AM |
| Americas | Europe | Eastern Europe Asia Pacific |