binary web service etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
binary web service etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

10 Eylül 2009 Perşembe

read/write file with web service

after a totally sleepless night, this morning i was googling to find a binding for java.io.File in web services with an unclear mind and very upset since i was not even close to my intention :((

you know, type of the file parameter in the following service becomes string in the client side..

@WebMethod(operationName = "retrieveFile")
@Oneway
public void retrieveFile(@WebParam(name = "file")
File file) {
}

the wsdl

<xs:complexType name="retrieveFile"
>
<xs:sequence>
<xs:element name="file" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

so, what to do ?
lucily, a friend in the team has searched for it before and came back with a solution:

http://m-button.blogspot.com/2008/07/building-jax-rpc-or-jax-ws-webservices.html

it is checked, guaranteed to work..

23 Haziran 2009 Salı

more notes on Jbossws + Eclipse


Unfortunately, i did not notice that the client stubs were generated by Axis2 not jax-ws (wsit runtime). Therefore, the solution is still incomplete :(

Now, extra steps are:
  • download jboss tools from http://www.jboss.org/tools/download/stable/3_0_GA.html (i downloaded all plugins part, the first part..)
  • install the plugins on eclipse ganymede by extracting the zip and copying plugins and features folders in the extracted package to your eclipse folder 
  • install stp (soa tools project) plugin to eclipse via software updates. the update site is http://download.eclipse.org/stp/updates/ganymede/
  • window --> preferences --> web services --> Jbossws preferences  : add ... /jbossws-metro-bin-dist/output/deploy-jboss500
  •  restart eclipse
Now the environment seems ready..  however, there exists problems that i can not overcome :( for instance while generating a bottom up web service using the jbossws runtime, i get the following error:
error: Could not find class file for com.example.Eval
1 error
Error: Could not generate. (use --show-traces to see full traces)
Error: Wsgen invocation failed. Try the '-verbose' switch for more information

i could not solve the error :(
however, this post is just to note down the preparation of the eclipse environment for web service development :)

24 Nisan 2009 Cuma

Hessian

Hessian is a binary web service protocol.. In our project, performance is a big issue.. So, we are excited by hearing about word binary instead of xml..
At first glance, Hessian seems to lack a lot of good properties that xml web services have.. it is not a standard, it uses its own stnadard and at the client side, you have to put some adapter to deserialize the incoming message from the server (i think??). Besides, as you change the programming language, you have to change the Hessian implementation you are using.. However, performance is a big deal!! So, lets stop complaininng and try !!

http://hessian.caucho.com/
http://java.dzone.com/articles/hessian-web-service-protocol --> this is a hello world hessian example and source code can be downloaded here: http://peat_hal.users.sourceforge.net/HessianExample.zip
This example is a good starting point. It uses Jetty automatically when the servlet is started, so do not bother about deployment.. I noticed that the client side wants to see the interface of the web service at the server side.. Normally, this is carried out by generated artifacts in xml web services..

I am going to try Hessian on complex examples later... It is ok for noww..