yefeng Gu

Greenhorn
+ Follow
since Sep 19, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by yefeng Gu

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<env:Header>
<wsa:MessageID env:mustUnderstand="0">uuid:c226a4a0-7cdd-11da-a9c3-ef335328f702</wsa:MessageID>
<wsa:To env:mustUnderstand="0">http://168.68.2.117:8080/DataAccess/services/DataAccess</wsa:To>;
<wsa:From env:mustUnderstand="0">
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>;
</wsa:From>
<wsa:Action>send</wsa:Action>
</env:Header>
<env:Body>
<ns1:search env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:ns1="http://services.das.egs.org">
<dataIdentifier href="#id0"/>
<xCondition xsi:type="ns2:XConditionType" xsi:nil="true" xmlns:ns2="http://www.org.egs.cn/services/DataAccess"/>
<resourceAddress xsi:type="xsd:string">LocalPeer/oracle1</resourceAddress>
</ns1:search>
<multiRef id="id0" soapenc:root="0" env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xsi:type="ns3 ataIdentifier" xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding" xmlns:ns3="http://www.org.egs.cn/services/DataAccess">
<identifier xsi:type="soapenc:string">c1cba75b0affdce300c26b1606e2fb7a0</identifier>
<regAuthorityICCode xsi:type="soapenc:string">Wonder Group</regAuthorityICCode>
<regAuthorityOrgId xsi:type="soapenc:string">Wonder Group</regAuthorityOrgId>
<version xsi:type="soapenc:string">1.0</version>
</multiRef>
</env:Body>
</env:Envelope>
what's wrong with this soap message? i use soapTest,it always return bad argumnent.
So thx.
18 years ago
1. client received correct response like without use ResponseHandler,though
Response Handler takes effect for i find the log it makes in my pc.

2. the character i use is chinese , but the faultString isn't chinese but
other ascii character without meaning.
The response xml is <?xml version="1.0" encoding="UTF-8"?>
i made nothing except throw AxisFault,so i think the xml is valid.

3. I use is Axis1.3, so i don't know whether the subcode is escaped by
SOAPTest tool or by default,my server return.

I will do test on 2 and 3,but for the 1)question i haven't good methods to
try.

So thx for your recommendtions.
18 years ago
besides this,here also other question:
1) i cannot find subcode of axisFault,server i use axis1.3,client i use soapTest1.4.2
2) the characters "不存在" cannot be recogined


the follow is my server-config.wsdd:

..... <globalConfiguration>
.... <requestFlow>
<handler type="java rg.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java rg.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
<handler name="logging" type="java rg.egs.das.services.LMDtRequestHandler">
</handler>
</requestFlow>
<responseFlow>
<handler name="respHandler" type="java rg.egs.das.services.LMDtResponseHandler"/>
</responseFlow>
</globalConfiguration>
.......
<service name="DataAccess" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
..... <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns1:XFieldReference" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java rg.egs.das.datatype.XFieldReference" xmlns:ns1="http://www.org.egs.cn/services/DataAccess"/>
.... <requestFlow>
<handler type="java rg.egs.das.services.LMDtRequestHandler"/>
</requestFlow>
<responseFlow>
<handler type="java rg.egs.das.services.LMDtResponseHandler"/>
</responseFlow>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java rg.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
</deployment>
18 years ago
i have tried the LogHandler is ok,but here something wrong:
i use my own RequestHandler to check the request soap message,if
isn't legal,i responsed with AxisFault,but i find my client can receive
the correct response; and i use repsonseHandler to check the response message,if something wrong,i change the returned soap message,here i also
use AxisFault :
fault= new AxisFault(new QName("env:Receiver"),new QName[]{new QName("303")},"不存在",null, null,null);
parm1.setCurrentMessage(new Message(fault));
but this cannot return axis fault message to client also.
18 years ago
I have extends BasicHandler in my own web Service ,
here the Handler is MyLogHandler,and i have configured
this Handler in server-config.wsdd,
but when i invoke the web service,my client cannot
get the web service information,
though the Handler worked.
I want to know whether the handler cannot effect on
the web service others handler and response handler?
if so,why my client cannot get the response?

the hanlder code is followed( i have copied this from others)

Handler handler = parm1.getService();
String filename = (String)getOption("filename");
if ((filename == null) || (filename.equals("")))
throw new AxisFault("Server.NoLogFile",
"No log file configured for
the LogHandler!",
null, null);
FileOutputStream fos = new FileOutputStream(filename, true);
PrintWriter writer = new PrintWriter(fos);
Integer counter = (Integer)handler.getOption("accesses");
if (counter == null)
counter = new Integer(0);

counter = new Integer(counter.intValue() + 1);
Date date = new Date();
parm1.getMessage().writeTo(System.out);

String result = "在"+date + ": Web 服务 " +
parm1.getTargetService() +
" 被调用,现在已经共调用了 " + counter + " 次.";
handler.setOption("accesses", counter);
writer.println(result);
writer.close();

So Thanks!
18 years ago