Axis2
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[JAVAの記事一覧]]
*目次 [#cf14e4bc]
#contents
*Axis2 [#jb30914a]
Axis2ってWDSLのツールが便利だった覚えがあるんだけど、ちょ...
**URL [#af633fc1]
http://ws.apache.org/axis2/
**使い方 [#fb7d0b72]
ダウンロードして解凍すると下記のようなフォルダが出てくる
axis2-1.5\bin
**基本的な設定 [#ud8add36]
*いろいろな日本語のサイトをみて実験 [#m7edc867]
***こんなエラーがました。 [#i614ddf6]
最新版(2010/06/29時点での最新)落としたけど、
エラーが出て使い物にならなかった。
おっかしいいなぁ、去年の9月ごろのプロジェクトでは楽天のW...
ちゃんと使えていたのになぁ。
とりあえず、今は勉強のため、調べているだけなのでHelloWorl...
***エラーログ [#fb5c9adb]
C:\axis2-1.5.1\bin>wsdl2java.bat -uri http://ec2.amazona...
Using AXIS2_HOME: C:\axis2-1.5.1
Using JAVA_HOME: C:\java\jdk1.6.0_20
Retrieving document at 'http://ec2.amazonaws.com/doc/200...
Exception in thread "main" org.apache.axis2.wsdl.codeg...
at org.apache.axis2.wsdl.codegen.CodeGenerationEn...
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code...
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java...
Caused by: javax.wsdl.WSDLException: WSDLException: faul...
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unkno...
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unkno...
at org.apache.axis2.wsdl.codegen.CodeGenerationEn...
at org.apache.axis2.wsdl.codegen.CodeGenerationEn...
... 2 more
Caused by: java.net.SocketException: Connection reset by...
at java.net.PlainSocketImpl.socketConnect(Native ...
at java.net.PlainSocketImpl.doConnect(PlainSocket...
at java.net.PlainSocketImpl.connectToAddress(Plai...
at java.net.PlainSocketImpl.connect(PlainSocketIm...
at java.net.SocksSocketImpl.connect(SocksSocketIm...
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient....
at sun.net.www.http.HttpClient.openServer(HttpCli...
at sun.net.www.http.HttpClient.openServer(HttpCli...
at sun.net.www.http.HttpClient.<init>(HttpClient....
at sun.net.www.http.HttpClient.New(HttpClient.jav...
at sun.net.www.http.HttpClient.New(HttpClient.jav...
at sun.net.www.protocol.http.HttpURLConnection.ge...
at sun.net.www.protocol.http.HttpURLConnection.pl...
at sun.net.www.protocol.http.HttpURLConnection.co...
at sun.net.www.protocol.http.HttpURLConnection.ge...
at java.net.URL.openStream(URL.java:1010)
at com.ibm.wsdl.util.StringUtils.getContentAsInpu...
... 6 more
*アマゾンの場合はツールを使おう [#c4a2ba75]
http://builder.japan.zdnet.com/sp/09-personal-cloud/story...
***参考URL [#f1bba7db]
-Axis2でクラウド用のWebサービスクライアントを作成する
http://japan.internet.com/developer/20090714/26.html
-Apache Axis2 (Pukiwiki)
http://w3.doshisha.ac.jp/~mogawa/index.php?Apache%20Axis2
-Axis2によるWebサービス
http://www.ee.e-mansion.com/~egami/axis2/index.html
よさそうだったので、これをたしかめてみる。
-チュートリアル風(英語)
http://www.crosschecknet.com/web_services_testing_tools_a...
***axis2.bat [#f86e001f]
***axis2server.bat [#q7fddae0]
***java2wsdl.bat [#d5f30e4c]
***wsdl2java.bat [#q2fc0293]
*Axis2のwarファイルをEclipseにインポートしてみる。 [#v20...
おいおい、コンパイルエラーじゃん。
あと、必要なjarファイルが2つも取り込まれていないって、ど...
おそらく、自分の間違いじゃないはず、だって
2010/06/29時点で最新のEclipseのオールインワンで取り込んだ...
**修正箇所 [#l7703a7f]
List型で帰ってくる箇所をArrayList型で代入しようとしている...
**取り込みJar [#xfd67ded]
-jsp-api.jar
-servlet-api.jar
*いざ実行 [#m48d64d1]
http://localhost:8080/axis2/services/Version?wsdl
Tomcatはダウンロードして解凍してあれば多分動作します。
**Tomcatが動いていない場合 [#x13bb741]
HTTPステータス 404 - /axis2/services/
となる
**正常な結果 [#f0bda0c3]
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org...
<wsdl:documentation>Version</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" eleme...
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0" name="Excep...
</xs:sequence>
</xs:complexType>
<xs:element name="Exception">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="E...
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getVersionResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="r...
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getVersionRequest"/>
<wsdl:message name="getVersionResponse">
<wsdl:part name="parameters" element="ns:getVersi...
</wsdl:message>
<wsdl:message name="Exception">
<wsdl:part name="parameters" element="ns:Exceptio...
</wsdl:message>
<wsdl:portType name="VersionPortType">
<wsdl:operation name="getVersion">
<wsdl:input message="ns:getVersionRequest" ws...
<wsdl:output message="ns:getVersionResponse" ...
<wsdl:fault message="ns:Exception" name="Exce...
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="VersionSoap11Binding" type="ns:Ve...
<soap:binding transport="http://schemas.xmlsoap.o...
<wsdl:operation name="getVersion">
<soap:operation soapAction="urn:getVersion" s...
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception...
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="VersionSoap12Binding" type="ns:Ve...
<soap12:binding transport="http://schemas.xmlsoap...
<wsdl:operation name="getVersion">
<soap12:operation soapAction="urn:getVersion"...
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Excepti...
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="VersionHttpBinding" type="ns:Vers...
<http:binding verb="POST"/>
<wsdl:operation name="getVersion">
<http:operation location="Version/getVersion"/>
<wsdl:input>
<mime:content type="text/xml" part="getVe...
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="getVe...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Version">
<wsdl:port name="VersionHttpSoap11Endpoint" bindi...
<soap:address location="http://localhost:8080...
</wsdl:port>
<wsdl:port name="VersionHttpSoap12Endpoint" bindi...
<soap12:address location="http://localhost:80...
</wsdl:port>
<wsdl:port name="VersionHttpEndpoint" binding="ns...
<http:address location="http://localhost:8080...
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
**ためしにやってみました。 [#n1231f44]
http://localhost:8080/axis2/services/AnnoTestServiceServi...
**こんなエラーが出てきました。 [#k59dd38e]
[ERROR] An error was detected during JAXWS processing
org.apache.axis2.AxisFault: An error was detected during...
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.re...
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine...
at org.apache.axis2.transport.http.util.RESTUtil.invokeA...
at org.apache.axis2.transport.http.util.RESTUtil.process...
at org.apache.axis2.transport.http.AxisServlet$RestReque...
at org.apache.axis2.transport.http.AxisServlet.doGet(Axi...
at javax.servlet.http.HttpServlet.service(HttpServlet.ja...
at javax.servlet.http.HttpServlet.service(HttpServlet.ja...
at org.apache.catalina.core.ApplicationFilterChain.inter...
at org.apache.catalina.core.ApplicationFilterChain.doFil...
at org.apache.catalina.core.StandardWrapperValve.invoke(...
at org.apache.catalina.core.StandardContextValve.invoke(...
at org.apache.catalina.core.StandardHostValve.invoke(Sta...
at org.apache.catalina.valves.ErrorReportValve.invoke(Er...
at org.apache.catalina.core.StandardEngineValve.invoke(S...
at org.apache.catalina.connector.CoyoteAdapter.service(C...
at org.apache.coyote.http11.Http11Processor.process(Http...
at org.apache.coyote.http11.Http11Protocol$Http11Connect...
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIo...
at java.lang.Thread.run(Thread.java:595)
*参考ページ [#oe2ed3c2]
下記のURLも参考にしようか
http://wikiwiki.jp/lovebeer/?%B3%D8%A4%D6%2F%A5%B5%A5%F3%...
終了行:
[[JAVAの記事一覧]]
*目次 [#cf14e4bc]
#contents
*Axis2 [#jb30914a]
Axis2ってWDSLのツールが便利だった覚えがあるんだけど、ちょ...
**URL [#af633fc1]
http://ws.apache.org/axis2/
**使い方 [#fb7d0b72]
ダウンロードして解凍すると下記のようなフォルダが出てくる
axis2-1.5\bin
**基本的な設定 [#ud8add36]
*いろいろな日本語のサイトをみて実験 [#m7edc867]
***こんなエラーがました。 [#i614ddf6]
最新版(2010/06/29時点での最新)落としたけど、
エラーが出て使い物にならなかった。
おっかしいいなぁ、去年の9月ごろのプロジェクトでは楽天のW...
ちゃんと使えていたのになぁ。
とりあえず、今は勉強のため、調べているだけなのでHelloWorl...
***エラーログ [#fb5c9adb]
C:\axis2-1.5.1\bin>wsdl2java.bat -uri http://ec2.amazona...
Using AXIS2_HOME: C:\axis2-1.5.1
Using JAVA_HOME: C:\java\jdk1.6.0_20
Retrieving document at 'http://ec2.amazonaws.com/doc/200...
Exception in thread "main" org.apache.axis2.wsdl.codeg...
at org.apache.axis2.wsdl.codegen.CodeGenerationEn...
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code...
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java...
Caused by: javax.wsdl.WSDLException: WSDLException: faul...
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unkno...
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unkno...
at org.apache.axis2.wsdl.codegen.CodeGenerationEn...
at org.apache.axis2.wsdl.codegen.CodeGenerationEn...
... 2 more
Caused by: java.net.SocketException: Connection reset by...
at java.net.PlainSocketImpl.socketConnect(Native ...
at java.net.PlainSocketImpl.doConnect(PlainSocket...
at java.net.PlainSocketImpl.connectToAddress(Plai...
at java.net.PlainSocketImpl.connect(PlainSocketIm...
at java.net.SocksSocketImpl.connect(SocksSocketIm...
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient....
at sun.net.www.http.HttpClient.openServer(HttpCli...
at sun.net.www.http.HttpClient.openServer(HttpCli...
at sun.net.www.http.HttpClient.<init>(HttpClient....
at sun.net.www.http.HttpClient.New(HttpClient.jav...
at sun.net.www.http.HttpClient.New(HttpClient.jav...
at sun.net.www.protocol.http.HttpURLConnection.ge...
at sun.net.www.protocol.http.HttpURLConnection.pl...
at sun.net.www.protocol.http.HttpURLConnection.co...
at sun.net.www.protocol.http.HttpURLConnection.ge...
at java.net.URL.openStream(URL.java:1010)
at com.ibm.wsdl.util.StringUtils.getContentAsInpu...
... 6 more
*アマゾンの場合はツールを使おう [#c4a2ba75]
http://builder.japan.zdnet.com/sp/09-personal-cloud/story...
***参考URL [#f1bba7db]
-Axis2でクラウド用のWebサービスクライアントを作成する
http://japan.internet.com/developer/20090714/26.html
-Apache Axis2 (Pukiwiki)
http://w3.doshisha.ac.jp/~mogawa/index.php?Apache%20Axis2
-Axis2によるWebサービス
http://www.ee.e-mansion.com/~egami/axis2/index.html
よさそうだったので、これをたしかめてみる。
-チュートリアル風(英語)
http://www.crosschecknet.com/web_services_testing_tools_a...
***axis2.bat [#f86e001f]
***axis2server.bat [#q7fddae0]
***java2wsdl.bat [#d5f30e4c]
***wsdl2java.bat [#q2fc0293]
*Axis2のwarファイルをEclipseにインポートしてみる。 [#v20...
おいおい、コンパイルエラーじゃん。
あと、必要なjarファイルが2つも取り込まれていないって、ど...
おそらく、自分の間違いじゃないはず、だって
2010/06/29時点で最新のEclipseのオールインワンで取り込んだ...
**修正箇所 [#l7703a7f]
List型で帰ってくる箇所をArrayList型で代入しようとしている...
**取り込みJar [#xfd67ded]
-jsp-api.jar
-servlet-api.jar
*いざ実行 [#m48d64d1]
http://localhost:8080/axis2/services/Version?wsdl
Tomcatはダウンロードして解凍してあれば多分動作します。
**Tomcatが動いていない場合 [#x13bb741]
HTTPステータス 404 - /axis2/services/
となる
**正常な結果 [#f0bda0c3]
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org...
<wsdl:documentation>Version</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" eleme...
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0" name="Excep...
</xs:sequence>
</xs:complexType>
<xs:element name="Exception">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="E...
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getVersionResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="r...
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getVersionRequest"/>
<wsdl:message name="getVersionResponse">
<wsdl:part name="parameters" element="ns:getVersi...
</wsdl:message>
<wsdl:message name="Exception">
<wsdl:part name="parameters" element="ns:Exceptio...
</wsdl:message>
<wsdl:portType name="VersionPortType">
<wsdl:operation name="getVersion">
<wsdl:input message="ns:getVersionRequest" ws...
<wsdl:output message="ns:getVersionResponse" ...
<wsdl:fault message="ns:Exception" name="Exce...
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="VersionSoap11Binding" type="ns:Ve...
<soap:binding transport="http://schemas.xmlsoap.o...
<wsdl:operation name="getVersion">
<soap:operation soapAction="urn:getVersion" s...
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception...
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="VersionSoap12Binding" type="ns:Ve...
<soap12:binding transport="http://schemas.xmlsoap...
<wsdl:operation name="getVersion">
<soap12:operation soapAction="urn:getVersion"...
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Excepti...
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="VersionHttpBinding" type="ns:Vers...
<http:binding verb="POST"/>
<wsdl:operation name="getVersion">
<http:operation location="Version/getVersion"/>
<wsdl:input>
<mime:content type="text/xml" part="getVe...
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="getVe...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Version">
<wsdl:port name="VersionHttpSoap11Endpoint" bindi...
<soap:address location="http://localhost:8080...
</wsdl:port>
<wsdl:port name="VersionHttpSoap12Endpoint" bindi...
<soap12:address location="http://localhost:80...
</wsdl:port>
<wsdl:port name="VersionHttpEndpoint" binding="ns...
<http:address location="http://localhost:8080...
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
**ためしにやってみました。 [#n1231f44]
http://localhost:8080/axis2/services/AnnoTestServiceServi...
**こんなエラーが出てきました。 [#k59dd38e]
[ERROR] An error was detected during JAXWS processing
org.apache.axis2.AxisFault: An error was detected during...
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.re...
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine...
at org.apache.axis2.transport.http.util.RESTUtil.invokeA...
at org.apache.axis2.transport.http.util.RESTUtil.process...
at org.apache.axis2.transport.http.AxisServlet$RestReque...
at org.apache.axis2.transport.http.AxisServlet.doGet(Axi...
at javax.servlet.http.HttpServlet.service(HttpServlet.ja...
at javax.servlet.http.HttpServlet.service(HttpServlet.ja...
at org.apache.catalina.core.ApplicationFilterChain.inter...
at org.apache.catalina.core.ApplicationFilterChain.doFil...
at org.apache.catalina.core.StandardWrapperValve.invoke(...
at org.apache.catalina.core.StandardContextValve.invoke(...
at org.apache.catalina.core.StandardHostValve.invoke(Sta...
at org.apache.catalina.valves.ErrorReportValve.invoke(Er...
at org.apache.catalina.core.StandardEngineValve.invoke(S...
at org.apache.catalina.connector.CoyoteAdapter.service(C...
at org.apache.coyote.http11.Http11Processor.process(Http...
at org.apache.coyote.http11.Http11Protocol$Http11Connect...
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIo...
at java.lang.Thread.run(Thread.java:595)
*参考ページ [#oe2ed3c2]
下記のURLも参考にしようか
http://wikiwiki.jp/lovebeer/?%B3%D8%A4%D6%2F%A5%B5%A5%F3%...
ページ名: