我的Spring Web服务客户端有这个自定义解析器来捕获SoapFaults:
public class MySoapFaultResolver extends SoapFaultMessageResolver implements FaultMessageResolver
{
private static Logger logger = Logger.getLogger( MySoapFaultResolver.class);
@Override
public void resolveFault(WebServiceMessage wsm) throws IOException
{
logger.debug("entering");
// SOAPMessage soapMessage = (SOAPMessage) wsm; cant cast to this
SoapMessage soapMessage = (SoapMessage) wsm;
if( soapMessage == null) {
logger.debug("soapMessage is null");
} else {
logger.debug("soapMessage is not null");
QName om_fc = soapMessage.getFaultCode();
String om_frs = soapMessage.getFaultReason();
logger.debug("om_fc:" + om_fc);
logger.debug("om_frs:" + om_frs);
if( soapMessage.getSoapBody() == null) {
logger.debug("soap body is null");
} …Run Code Online (Sandbox Code Playgroud) Java 1.7 Spring 3.1.1 with Spring-WS 2.1.1 Joda Hibernate 3.6 MySQL 5.0.57 Maven 3 Tomcat 7 Eclipse 3.7
已部署Web服务并部署Web客户端,Web服务和Web客户端相互通信.
但就像在老式的视频游戏中一样,杀死一批龙只会产生另一批龙.
现在它是整个Joda Datetime xs:dateTime jaxb绑定的东西,它向我喷火.
谷歌搜索提出了许多我试图遵循的解决方案.
代表实体
@Entity
@Table(name="form_templates", catalog="mycomp")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class FormTemplate implements java.io.Serializable
{
private static final long serialVersionUID = 8533964268513480152L;
....
@Column(name="revision_datetime")
@Type(type="org.joda.time.contrib.hibernate.PersistentDateTime")
@XmlElement(name="revisionTimestamp")
@XmlJavaTypeAdapter(JodaDateTimeAdapter.class)
@XmlSchemaType(name="dateTime")
DateTime revisionTimestamp;
....
}
Run Code Online (Sandbox Code Playgroud)
JodaDateTimeAdapter
@XmlTransient
public class JodaDateTimeAdapter extends XmlAdapter<String, DateTime>
{
private static final DateTimeFormatter XML_DATE_FORMAT = ISODateTimeFormat.dateTimeNoMillis();
private static final DateTimeFormatter XML_DATE_TIME_FORMAT = ISODateTimeFormat.localDateOptionalTimeParser();
private static final …Run Code Online (Sandbox Code Playgroud) 所以我有这个非常简化的片段:
@cmd_arry = ("Bob Newhart", "54");
$sqlCmd = "UPDATE foobar SET name = ?, age = ?";
$sth = $dbh->prepare( $sqlCmd);
$resultCnt = $sth->execute( @cmd_arry);
if( my $errMsg = $dbh->errstr) {
$what_actually_executed = <what?>
Run Code Online (Sandbox Code Playgroud)
问题:如何检索AS EXECUTED语句,即数据绑定发生后?我想要一种捕获实际执行语句的方法,包括绑定值,如果出现问题.
dbi ×1
java ×1
jaxb ×1
jodatime ×1
perl ×1
soap-client ×1
spring ×1
web-services ×1
wsdl2java ×1
xmladapter ×1